/* =============================================
   UI/UX refinements — loaded after main + landing.
   Kept separate so it can be reviewed or rolled back on its own.
   ============================================= */

:root { --gut: clamp(20px, 4.5vw, 64px); --wrap: 1312px }

/* ---------- Typography: "Inter" is never loaded, so the homepage fell back to Arial ---------- */
body,
.fg input, .fg select, .fg textarea,
.sbtn, .ptab, .pcb, .btn-primary, .btn-outline { font-family: "DM Sans", sans-serif }

/* ---------- One consistent content edge on the homepage (matches header + footer) ---------- */
body.home .hero { padding-left: var(--gut); padding-right: var(--gut) }
body.home .hero-inner { max-width: var(--wrap); margin: 0 auto; width: 100% }
body.home .sec { max-width: calc(var(--wrap) + 2 * var(--gut)); padding-left: var(--gut); padding-right: var(--gut) }
body.home .sec-tint,
body.home .sec-dark { padding-left: var(--gut); padding-right: var(--gut) }
body.home .sec-tint .inn,
body.home .sec-dark .inn { max-width: var(--wrap) }
body.home .stats-row { width: calc(100% - 2 * var(--gut)); max-width: var(--wrap) }
body.home .fcta { max-width: var(--wrap); margin-left: auto; margin-right: auto }
@media (max-width: 1440px) { body.home .fcta { margin-left: var(--gut); margin-right: var(--gut) } }

/* Services and Portfolio were two tinted sections back to back — no visual break */
body.home .sec-tint + .sec-tint { background: var(--bg) }

/* ---------- Icons (SVG replaces emoji) ---------- */
.wds-ico { display: block; flex-shrink: 0; color: #7c3aed }
html:not(.light) .wds-ico { color: #c084fc }
.wicon, .sv-icon, .tech-icon, .ci-ico { line-height: 0 }
.tech-icon .wds-ico { width: 24px; height: 24px }
.pain-icon .wds-ico { color: #dc2626; width: 20px; height: 20px }
html:not(.light) .pain-icon .wds-ico { color: #f87171 }
.pv-emoji {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 20px;
  display: grid; place-items: center; background: var(--grad, linear-gradient(135deg,#7c3aed,#c026d3));
  box-shadow: 0 10px 30px rgba(124,58,237,.28)
}
.pv-emoji .wds-ico, html:not(.light) .pv-emoji .wds-ico { color: #fff; width: 32px; height: 32px }

/* ---------- Portfolio cards: screenshot text was bleeding through the caption ---------- */
.pc-ov,
html.light .pc-ov {
  background: linear-gradient(to top, rgba(12,7,24,.97) 0%, rgba(12,7,24,.9) 28%, rgba(12,7,24,.35) 58%, rgba(12,7,24,0) 78%)
}
.pc-tag.gt {
  background: none; -webkit-background-clip: initial; background-clip: initial;
  -webkit-text-fill-color: #e9d5ff; color: #e9d5ff
}
.pc-name { font-size: 1.3rem }
.pc-url { color: rgba(255,255,255,.7) }
.pc-view.gt { -webkit-text-fill-color: #fff; color: #fff; background: none }
.pc:focus-visible { outline: 3px solid #8b3fcc; outline-offset: 3px }

/* ---------- Pricing: price descenders collided with the sub-line ---------- */
.pcp { line-height: 1.1; margin: 4px 0 8px }

/* ---------- Footer: link colour was ~2:1 contrast ---------- */
.ft-links a { color: rgba(214,204,240,.75) }
html.light .ft-links a { color: var(--t3) }
.ft-links a:hover, html.light .ft-links a:hover { color: var(--c2, #8b3fcc) }
html.light .ft-h { color: var(--t2) }
html.light .ft-copy, html.light .ft-legal a { color: var(--t3) }

/* ---------- Portfolio filters: 12 wrapped chips filled the first mobile screen ---------- */
@media (max-width: 767px) {
  .filters {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-left: -20px; margin-right: -20px;
    padding: 2px 20px 6px; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%)
  }
  .filters::-webkit-scrollbar { display: none }
  .filters .fp { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap }
}

/* ---------- Single service ---------- */
.srv-h1-ico {
  display: inline-grid; place-items: center; width: .9em; height: .9em; margin-right: .25em;
  vertical-align: -.08em; border-radius: .22em;
  background: rgba(139,63,204,.1); border: 1px solid rgba(139,63,204,.2)
}
.srv-h1-ico .wds-ico { width: .5em; height: .5em }
.srv-other-ico { display: inline-flex }
.srv-cta-card {
  border-radius: 20px; padding: 40px 36px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #5C2D9A, #8B3FCC 55%, #C040B8);
  color: #fff; box-shadow: 0 20px 50px rgba(92,45,154,.25)
}
.srv-cta-card::after {
  content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -90px;
  border-radius: 50%; background: rgba(255,255,255,.08); pointer-events: none
}
.srv-cta-ico {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); margin-bottom: 22px
}
.srv-cta-ico .wds-ico, html:not(.light) .srv-cta-ico .wds-ico { color: #fff }
.srv-cta-h { font-family: "Cormorant Garamond", serif; font-size: 1.9rem; line-height: 1.1; font-weight: 700; color: #fff; margin-bottom: 10px }
.srv-cta-p { font-size: .98rem; line-height: 1.65; color: rgba(255,255,255,.85); margin-bottom: 24px; max-width: 420px }
.srv-cta-btn {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #4c1d95;
  font-weight: 700; font-size: .95rem; padding: 13px 24px; border-radius: 9999px;
  transition: transform .2s, box-shadow .2s; position: relative; z-index: 1
}
.srv-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18) }

/* ---------- Spacing fixes ---------- */
body.home .pgrid { margin-top: 36px }
.cta-l > p { margin-bottom: 24px; line-height: 1.6 }
.cta-checks { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px }

/* ---------- Dark mode: services grid panel stayed light lavender behind dark cards ---------- */
html:not(.light) .svc-grid { background: rgba(139,63,204,.08); border: 1px solid rgba(139,63,204,.16) }

/* =============================================
   Round 2 — layout & flow
   ============================================= */


/* Announcement bar: one short line on phones instead of two */
.ann-short { display: none }
@media (max-width: 640px) { .ann-long { display: none } .ann-short { display: inline } }

/* Small headings read better in the sans face than in Cormorant */
.faq-q { font-family: "DM Sans", sans-serif; font-size: 16px; font-weight: 600 }
.pain-item h3 { font-family: "DM Sans", sans-serif; font-size: 17px; font-weight: 600 }

/* "Explore" links: solid colour instead of a pale gradient */
.sv-link.gt { background: none; -webkit-background-clip: initial; background-clip: initial; -webkit-text-fill-color: #6d28d9; color: #6d28d9 }
html:not(.light) .sv-link.gt { -webkit-text-fill-color: #c084fc; color: #c084fc }

/* Services on phones: compact rows instead of nine tall cards */
@media (max-width: 767px) {
  .svc-grid { padding: 10px; gap: 8px; margin-top: 1.75rem }
  .sv { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; padding: 16px; border-radius: 14px }
  .sv:hover { transform: none }
  .sv-num { display: none }
  .sv-icon { grid-row: 1 / span 3; width: 44px; height: 44px; margin: 2px 0 0 }
  .sv-t { font-size: 1.08rem; margin: 0 0 4px }
  .sv-d { font-size: .92rem; line-height: 1.5; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
  .sv-link { font-size: .9rem }
}

/* Contact: on tablet/phone show the form before the info column */
@media (max-width: 1024px) { .con-grid > .d1 { order: -1 } }

/* Inline mail icons */
.cf-note-ico, .ft-mail-ico { display: inline-flex; vertical-align: -2px; margin-right: 6px }

/* Mobile sticky CTA */
.m-cta { display: none }
@media (max-width: 767px) {
  .m-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: fixed; left: 16px; right: 16px; bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 990; padding: 15px 20px; border-radius: 9999px;
    background: linear-gradient(135deg, #5C2D9A, #8B3FCC 55%, #C040B8); color: #fff;
    font-family: "DM Sans", sans-serif; font-weight: 700; font-size: .98rem;
    box-shadow: 0 12px 30px rgba(92,45,154,.35);
    transform: translateY(140%); opacity: 0; pointer-events: none;
    transition: transform .3s ease, opacity .3s ease
  }
  .m-cta.on { transform: none; opacity: 1; pointer-events: auto }
}
@media (prefers-reduced-motion: reduce) { .m-cta { transition: none } }

/* =============================================
   Round 3
   ============================================= */

/* Pricing sits between two white sections after the reorder — give it a full-width tint */
body.home #pricing {
  max-width: none; background: var(--bg2);
  padding-left: max(var(--gut), calc((100% - var(--wrap)) / 2));
  padding-right: max(var(--gut), calc((100% - var(--wrap)) / 2))
}

/* Hero thumbnails now show real portfolio work */
.thumb-work { position: relative; display: block }
.thumb-work img { object-position: top center }
.thumb-cap {
  position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: 9999px;
  background: rgba(12,7,24,.78); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(4px)
}

/* Mobile menu CTA inherited the serif menu-link font */
.mob-cta-row .btn { font-family: "DM Sans", sans-serif; font-weight: 700; justify-content: center; width: 100% }

/* Contrast fixes flagged by Lighthouse */
.sec-dark .cta-card .fnote, .cta-card .fnote { color: rgba(255,255,255,.68) }
html.light .ci-label { color: #6d28d9 }
.hero-main picture { display: contents }

/* =============================================
   Conversion (CRO) round
   ============================================= */
#form, #pricing, #quick-quote { scroll-margin-top: 110px }

/* Pre-footer quick-quote band */
.lead-band { padding: 80px var(--gut); background: linear-gradient(135deg, #1a0f2e 0%, #2a1250 55%, #3b1366 100%); color: #fff }
.lead-band-in { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center }
.lead-band-ey { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #e9d5ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); padding: 6px 14px; border-radius: 9999px; margin-bottom: 18px }
.lead-band-h { font-family: "Cormorant Garamond", serif; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.05; font-weight: 700; color: #fff; margin-bottom: 14px }
.lead-band-h em { font-style: italic; background: linear-gradient(135deg,#c084fc,#f0abfc); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent }
.lead-band-p { font-size: 1.02rem; line-height: 1.7; color: rgba(255,255,255,.78); margin-bottom: 20px; max-width: 520px }
.lead-band-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px }
.lead-band-list li { position: relative; padding-left: 28px; font-size: .95rem; color: rgba(255,255,255,.88) }
.lead-band-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 19px; height: 19px; border-radius: 50%; background: rgba(192,132,252,.2); color: #e9d5ff; font-size: .7rem; display: grid; place-items: center; font-weight: 700 }
.lead-band-form { background: #fff; color: #15082A; border-radius: 20px; padding: 28px; box-shadow: 0 30px 60px rgba(0,0,0,.3) }
html:not(.light) .lead-band-form { background: #14121f; color: #eee; border: 1px solid rgba(255,255,255,.08) }
.lb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px }
.lb-f label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: 6px; color: inherit }
.lb-f label span { font-weight: 400; opacity: .65 }
.lb-f input, .lb-f select {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit; font-size: .92rem;
  border: 1.5px solid rgba(92,45,154,.18); background: #f7f5ff; color: #15082A; outline: none; transition: border-color .2s, box-shadow .2s
}
html:not(.light) .lb-f input, html:not(.light) .lb-f select { background: #0d0c16; color: #eee; border-color: rgba(255,255,255,.12) }
.lb-f input:focus, .lb-f select:focus { border-color: #8b3fcc; box-shadow: 0 0 0 3px rgba(139,63,204,.15) }
.lb-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px;
  padding: 15px; border: 0; border-radius: 9999px; cursor: pointer; color: #fff; font: inherit; font-weight: 700; font-size: 1rem;
  background: linear-gradient(135deg, #5C2D9A, #8B3FCC 55%, #C040B8); transition: transform .2s, box-shadow .2s
}
.lb-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(92,45,154,.35) }
.lb-btn:disabled { opacity: .7; transform: none }
.lb-note { font-size: .78rem; text-align: center; margin-top: 10px; opacity: .75 }
.lb-note a { text-decoration: underline; color: inherit }
.lb-note.err { color: #dc2626; opacity: 1; font-weight: 600 }
@media (max-width: 900px) {
  .lead-band { padding: 56px 20px }
  .lead-band-in { grid-template-columns: 1fr; gap: 28px }
  .lb-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px }
  .lead-band-form { padding: 22px }
}

/* Success panel (replaces any lead form after submit) */
.lead-done { text-align: left; padding: 8px 2px; outline: none; animation: leadIn .4s ease }
@keyframes leadIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.lead-done-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; color: #fff; background: linear-gradient(135deg,#22c55e,#16a34a); margin-bottom: 16px; box-shadow: 0 10px 24px rgba(34,197,94,.3) }
.lead-done-h { font-family: "Cormorant Garamond", serif; font-size: 1.7rem; line-height: 1.15; font-weight: 700; margin-bottom: 8px; color: inherit }
.lead-done-p { font-size: .95rem; opacity: .8; margin-bottom: 14px }
.lead-done-steps { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 10px; font-size: .92rem; line-height: 1.55 }
.lead-done-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 9999px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #5C2D9A, #8B3FCC 55%, #C040B8) }
.sec-dark .lead-done, .sec-dark .lead-done-h { color: #fff }
@media (prefers-reduced-motion: reduce) { .lead-done { animation: none } }

/* Selected-plan chip in the homepage form */
.plan-chip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; font-size: .85rem; background: rgba(192,132,252,.12); border: 1px solid rgba(192,132,252,.35); color: #e9d5ff }
.plan-chip[hidden] { display: none }
.plan-chip strong { color: #fff }
.plan-chip button { background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px }
.fnote-privacy { margin-top: 4px !important; font-size: 11px !important; opacity: .8 }
.fnote-privacy a { color: inherit; text-decoration: underline }

/* Pricing — discount display (values come from Dashboard → Pricing) */
.pr-sale-banner { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 9px 16px; border-radius: 9999px; font-size: .88rem; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); color: #b91c1c }
html:not(.light) .pr-sale-banner { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.3); color: #fca5a5 }
.pr-sale-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.6s ease-in-out infinite }
.pc-sale { display: flex; align-items: center; gap: 10px; margin-bottom: 2px }
.pc-sale .pco { font-size: 1.05rem; font-weight: 600 }
.pc-save { font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 9999px; color: #fff; background: linear-gradient(135deg,#dc2626,#db2777) }
@media (prefers-reduced-motion: reduce) { .pr-sale-dot { animation: none } }
