/* ==========================================================================
   Eight Digital v2 — Legacy component layer (ek-*)
   Restyles the markup of all existing pages to the new light design.
   ========================================================================== */

/* ---------- Layout ---------- */
.ek-container { max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.ek-section { padding: clamp(52px, 7.5vw, 92px) 0; position: relative; }
.ek-center { text-align: center; }
.ek-main { display: block; }

/* page hero (each page brings its own) */
.ek-sec-hero {
  background:
    radial-gradient(680px 320px at 86% -12%, rgba(108, 92, 255, .12), transparent 60%),
    radial-gradient(600px 300px at 6% 112%, rgba(34, 184, 240, .1), transparent 60%);
  padding-block: clamp(46px, 6.5vw, 76px) clamp(38px, 5.5vw, 62px);
  border-bottom: 1px solid var(--line);
}
.ek-pagehead { border-bottom: 1px solid var(--line); }

.ek-hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(26px, 5vw, 56px); align-items: center; }
.ek-hero-grid > div { min-width: 0; }

/* badge / h1 / lead */
.ek-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line2); color: var(--mut);
  font-size: .82rem; font-weight: 700;
  padding: 8px 15px; border-radius: 999px; margin: 0 0 20px;
  box-shadow: 0 3px 12px rgba(16, 20, 60, .05);
}
.ek-h1 {
  font-size: clamp(1.85rem, 4.4vw, 3rem); line-height: 1.38; font-weight: 900;
  color: var(--tx); margin: 0 0 .45em;
}
.ek-lead { font-size: clamp(1rem, 1.55vw, 1.13rem); color: var(--mut); line-height: 2; max-width: 640px; }
.ek-grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.ek-hero-cta { display: flex; flex-wrap: wrap; gap: 13px; margin: 24px 0; }
.ek-hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; }
.ek-hero-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 600; color: var(--mut); }
.ek-hero-trust b { color: var(--vio); }

/* hero media (legacy pages with image) */
.ek-hero-media { position: relative; }
.ek-hero-img { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); line-height: 0; }
.ek-float-chip {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 15px;
  font-size: .8rem; font-weight: 700; color: var(--tx);
  box-shadow: var(--shadow);
}
.ek-chip-1 { top: 8%; inset-inline-start: -14px; }
.ek-chip-2 { bottom: 12%; inset-inline-end: -12px; }
.ek-float-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16, 185, 129, .18); }

/* ---------- Section headers ---------- */
.ek-sec-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.ek-eyebrow {
  display: inline-block; color: var(--vio); background: rgba(108, 92, 255, .09);
  border: 1px solid rgba(108, 92, 255, .22);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  padding: 6px 14px; border-radius: 999px; margin: 0 0 14px;
}
.ek-sec-head h2 { margin-bottom: .35em; }

/* ---------- Stats ---------- */
.ek-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ek-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 16px; text-align: center;
  box-shadow: 0 3px 14px rgba(16, 20, 60, .045);
  transition: transform .2s, box-shadow .2s;
}
.ek-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ek-stat b {
  display: block; font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  line-height: 1.35;
}
.ek-stat span { font-size: .84rem; color: var(--mut); font-weight: 600; }

/* ---------- Cards ---------- */
.ek-cards2, .ek-cards3, .ek-cards4 { display: grid; gap: 18px; }
.ek-cards2 { grid-template-columns: repeat(2, 1fr); }
.ek-cards3 { grid-template-columns: repeat(3, 1fr); }
.ek-cards4 { grid-template-columns: repeat(4, 1fr); }
.ek-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; position: relative; overflow: hidden;
  box-shadow: 0 3px 14px rgba(16, 20, 60, .045);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.ek-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity .22s;
}
.ek-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(108, 92, 255, .35); }
.ek-card:hover::before { opacity: 1; }
.ek-card h3 { margin: 15px 0 8px; font-size: 1.08rem; }
.ek-card p { font-size: .9rem; color: var(--mut); margin-bottom: 0; }

.ek-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 15px;
  background: rgba(108, 92, 255, .1); border: 1px solid rgba(108, 92, 255, .22);
  color: #5B4BE0; margin-bottom: 16px; flex-shrink: 0;
}
.ek-icon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ek-icon.cy { background: rgba(14, 165, 233, .1); border-color: rgba(14, 165, 233, .25); color: #0284C7; }
.ek-icon.gd { background: rgba(245, 158, 11, .11); border-color: rgba(245, 158, 11, .28); color: #D97706; }
.ek-icon.gr { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .25); color: #059669; }
.ek-card:nth-child(4n+2) .ek-icon { background: rgba(14, 165, 233, .1); border-color: rgba(14, 165, 233, .25); color: #0284C7; }
.ek-card:nth-child(4n+3) .ek-icon { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .25); color: #059669; }
.ek-card:nth-child(4n) .ek-icon { background: rgba(245, 158, 11, .11); border-color: rgba(245, 158, 11, .28); color: #D97706; }

/* ---------- Checklist ---------- */
.ek-checklist { list-style: none; margin: 0 0 1.4em; padding: 0; display: grid; gap: 11px; }
.ek-checklist li {
  position: relative; padding-inline-start: 34px;
  color: var(--mut); font-size: .94rem; line-height: 1.85;
}
.ek-checklist li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .28em;
  width: 21px; height: 21px; border-radius: 50%;
  background: rgba(16, 185, 129, .13) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* ---------- Media split ---------- */
.ek-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 60px); align-items: center; }
.ek-split-img {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); line-height: 0; position: relative;
}
.ek-split-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(108, 92, 255, .1), transparent 45%);
}
.ek-split h2 { margin-bottom: .4em; }

/* ---------- Steps ---------- */
.ek-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ek-steps.s3 { grid-template-columns: repeat(3, 1fr); }
.ek-step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px 22px;
  box-shadow: 0 3px 12px rgba(16, 20, 60, .04);
  transition: transform .2s, box-shadow .2s;
}
.ek-step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ek-step i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--grad); color: #fff; font-style: normal; font-weight: 900; font-size: 1.05rem;
  box-shadow: var(--glow); margin-bottom: 15px;
}
.ek-step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.ek-step p { font-size: .85rem; color: var(--mut); margin: 0; }

/* ---------- CTA band ---------- */
.ek-band {
  position: relative; overflow: hidden;
  background: var(--ink-grad);
  border-radius: calc(var(--r-lg) + 6px);
  padding: clamp(36px, 5.5vw, 62px) clamp(22px, 5vw, 60px);
  text-align: center; color: #fff;
}
.ek-band::before, .ek-band::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none;
}
.ek-band::before { width: 380px; height: 380px; background: rgba(108, 92, 255, .5); top: -190px; inset-inline-start: -90px; }
.ek-band::after { width: 330px; height: 330px; background: rgba(34, 184, 240, .4); bottom: -190px; inset-inline-end: -70px; }
.ek-band > * { position: relative; z-index: 1; }
.ek-band h2 { color: #fff; }
.ek-band p { color: rgba(238, 242, 255, .82); max-width: 620px; margin-inline: auto; }

/* ---------- FAQ ---------- */
.ek-faq { display: grid; gap: 12px; text-align: right; }
.ek-faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 4px 22px; transition: border-color .2s, box-shadow .2s;
}
.ek-faq details[open] { border-color: rgba(108, 92, 255, .4); box-shadow: var(--shadow); }
.ek-faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-weight: 800; font-size: .98rem; color: var(--tx); padding: 15px 0;
}
.ek-faq summary::-webkit-details-marker { display: none; }
.ek-faq summary::after {
  content: '+'; flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(108, 92, 255, .09); color: var(--vio);
  font-size: 1.25rem; font-weight: 700; line-height: 1;
  transition: transform .2s, background .2s;
}
.ek-faq details[open] summary::after { content: '−'; background: var(--vio); color: #fff; }
.ek-faq details p { font-size: .9rem; color: var(--mut); padding-bottom: 16px; margin: 0; }

/* ---------- Quotes ---------- */
.ek-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ek-quote-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 24px; margin: 0;
  box-shadow: 0 3px 14px rgba(16, 20, 60, .045);
  transition: transform .2s, box-shadow .2s;
}
.ek-quote-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ek-quote-card .stars { color: var(--gold); letter-spacing: 3px; font-size: .92rem; margin-bottom: 12px; }
.ek-quote-card blockquote {
  margin: 0 0 16px; padding: 0; border: 0; background: none;
  font-size: .9rem; color: var(--mut); line-height: 2.05;
}
.ek-quote-card .who { font-weight: 800; font-size: .9rem; color: var(--tx); }
.ek-quote-card .who small { display: block; font-weight: 500; color: var(--dim); font-size: .78rem; }

/* ---------- Pricing ---------- */
.ek-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.ek-plan {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 30px 26px;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ek-plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line2); }
.ek-plan h3 { font-size: 1.06rem; }
.ek-plan .price { font-size: 1.55rem; font-weight: 900; color: var(--tx); margin: 6px 0 2px; }
.ek-plan .price small { font-size: .78rem; font-weight: 600; color: var(--dim); }
.ek-plan .cond { font-size: .8rem; color: var(--dim); margin-bottom: 16px; }
.ek-plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; flex: 1; text-align: right; }
.ek-plan li { position: relative; padding-inline-start: 26px; font-size: .87rem; color: var(--mut); }
.ek-plan li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .48em;
  width: 15px; height: 15px; border-radius: 50%;
  background: rgba(16, 185, 129, .13) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E") center/9px no-repeat;
}
.ek-plan .ek-btn { justify-content: center; }
.ek-plan.featured { border-color: var(--vio); box-shadow: var(--glow); }
.ek-plan .tag {
  position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(50%);
  background: var(--grad); color: #fff; font-size: .72rem; font-weight: 800;
  padding: 4px 15px; border-radius: 999px; box-shadow: var(--glow);
}

/* ---------- Buttons (legacy markup) ---------- */
.ek-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--grad); color: #fff;
  font-family: inherit; font-weight: 700; font-size: .95rem;
  padding: 13px 26px; border-radius: 14px; border: 0; cursor: pointer;
  box-shadow: var(--glow);
  transition: transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.ek-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(108, 92, 255, .38); color: #fff; }
.ek-btn-ghost { background: #fff; color: var(--tx); border: 1.5px solid var(--line2); box-shadow: 0 2px 10px rgba(16, 20, 60, .05); }
.ek-btn-ghost:hover { border-color: var(--vio); color: var(--vio); box-shadow: var(--shadow); }
.ek-btn-sm { padding: 9px 18px; font-size: .88rem; border-radius: 11px; }

/* ---------- Blog cards (legacy homepage block) ---------- */
.ek-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ek-post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: 0 3px 14px rgba(16, 20, 60, .045);
  transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column; padding: 0;
}
.ek-post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ek-post-card-img { line-height: 0; background: var(--card2); aspect-ratio: 16 / 9; overflow: hidden; }
.ek-post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ek-post-card:hover .ek-post-card-img img { transform: scale(1.045); }
.ek-post-card .ek-post-meta { display: block; font-size: .76rem; color: var(--dim); font-weight: 600; padding: 18px 22px 0; }
.ek-post-card .ek-post-card-title { font-size: .99rem; line-height: 1.75; padding: 6px 22px 0; }
.ek-post-card .ek-post-card-title a { color: var(--tx); }
.ek-post-card .ek-post-card-title a:hover { color: var(--vio); }
.ek-post-card .ek-more { display: inline-block; font-size: .85rem; font-weight: 800; color: var(--vio); padding: 8px 22px 20px; }

/* ---------- Single article (legacy classes kept safe) ---------- */
.ek-article-wrap { max-width: 820px; margin-inline: auto; }
.ek-articlehead { padding: clamp(36px, 5vw, 58px) 0 8px; text-align: center; }
.ek-articlehead .ek-single-title { font-size: clamp(1.5rem, 3.4vw, 2.3rem); line-height: 1.5; margin-bottom: .4em; }
.ek-single-img { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); margin: 26px 0; line-height: 0; }
.ek-authorbox {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px 24px; margin-top: 34px; display: flex; gap: 16px; align-items: center;
}
.ek-sec-article { padding-top: 12px; }

/* ---------- Contact ---------- */
.ek-contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 30px; }
.ek-contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px 22px; text-align: center;
  box-shadow: 0 3px 12px rgba(16, 20, 60, .04);
}
.ek-contact-card b { display: block; font-size: .82rem; color: var(--dim); font-weight: 700; margin-bottom: 7px; }
.ek-contact-card span, .ek-contact-card a { font-size: .95rem; font-weight: 700; color: var(--tx); }
.ek-contact-card a:hover { color: var(--vio); }

.ek-form-wrap {
  max-width: 640px; margin-inline: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow);
}
.ek-form { display: grid; gap: 15px; }
.ek-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ek-form label { display: block; font-size: .84rem; font-weight: 700; color: var(--tx); margin-bottom: 7px; }
.ek-form input[type="text"], .ek-form input[type="tel"], .ek-form input[type="email"], .ek-form textarea {
  width: 100%; font-family: inherit; font-size: .93rem; color: var(--tx);
  background: #FBFBFE; border: 1.5px solid var(--line2); border-radius: 13px;
  padding: 12px 15px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.ek-form input:focus, .ek-form textarea:focus { border-color: var(--vio); box-shadow: 0 0 0 4px rgba(108, 92, 255, .12); background: #fff; }
.ek-form textarea { min-height: 120px; resize: vertical; }
.ek-form .hp { position: absolute; inset-inline-start: -9999px; height: 0; overflow: hidden; }
.ek-form .ek-btn { width: 100%; justify-content: center; }
.ek-form-ok { font-size: .9rem; font-weight: 700; color: var(--green); min-height: 1em; }
.ek-form-ok.err { color: #DC2626; }
.ek-note { color: var(--dim); font-size: .85rem; }

/* ---------- Portfolio ---------- */
.ek-folio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ek-folio-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: 0 3px 14px rgba(16, 20, 60, .045);
  transition: transform .22s ease, box-shadow .22s ease;
}
.ek-folio-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ek-folio-screen { aspect-ratio: 16 / 9; line-height: 0; position: relative; overflow: hidden; }
.ek-folio-screen::after {
  content: ''; position: absolute; inset: 18% 8% 0;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .35);
  border-bottom: 0;
}
.ek-folio-body { padding: 20px 22px; text-align: right; }
.ek-folio-body h3 { font-size: 1.02rem; margin-bottom: 7px; }
.ek-folio-body p { font-size: .86rem; color: var(--mut); margin-bottom: 13px; }
.ek-folio-body .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ek-folio-body .chips span {
  font-size: .72rem; font-weight: 700; color: var(--vio);
  background: rgba(108, 92, 255, .08); border: 1px solid rgba(108, 92, 255, .16);
  padding: 4px 11px; border-radius: 999px;
}

/* ---------- Pager ---------- */
.ek-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.ek-pager a, .ek-pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 14px;
  background: #fff; border: 1.5px solid var(--line2); border-radius: 12px;
  color: var(--tx); font-weight: 700; font-size: .86rem;
}
.ek-pager .current { background: var(--grad); border-color: transparent; color: #fff; }

/* ---------- Legacy header/footer wrappers (obsolete markup, keep safe) ---------- */
.ek-header-wrap, .ek-footer-wrap { display: none; }

/* ---------- WP core alignment (inside page content) ---------- */
.ek-main .alignwide, .nx-content .alignwide { width: min(1080px, 100%); margin-inline: auto; }
.ek-main .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); }
.ek-main .wp-block-image img, .nx-content .wp-block-image img { border-radius: var(--r-md); }
.ek-main .wp-block-video video { border-radius: var(--r-md); width: 100%; }
.ek-main .wp-block-quote { border-inline-start: 4px solid var(--vio); }

/* ---------- Legacy responsive ---------- */
@media (max-width: 1024px) {
  .ek-cards4 { grid-template-columns: repeat(2, 1fr); }
  .ek-hero-grid { grid-template-columns: 1fr; }
  .ek-sec-hero { text-align: right; }
}
@media (max-width: 960px) {
  .ek-cards3, .ek-quotes, .ek-pricing, .ek-folio, .ek-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .ek-steps, .ek-steps.s3 { grid-template-columns: repeat(2, 1fr); }
  .ek-split { grid-template-columns: 1fr; }
  .ek-split-img { order: -1; }
  .ek-stats { grid-template-columns: repeat(2, 1fr); }
  .ek-contact-cards { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ek-container { padding-inline: 17px; }
  .ek-cards2, .ek-cards3, .ek-cards4, .ek-quotes, .ek-pricing, .ek-folio, .ek-posts-grid { grid-template-columns: 1fr; }
  .ek-steps, .ek-steps.s3 { grid-template-columns: 1fr; }
  .ek-hero-cta .ek-btn { flex: 1; justify-content: center; }
  .ek-form-row { grid-template-columns: 1fr; }
  .ek-chip-1 { inset-inline-start: -4px; }
  .ek-chip-2 { inset-inline-end: -4px; }
}
