/* ============================================================
   Enhancements — targeted refinements layered over the original
   design (mzmedia-style buttons, hero panel entrance, font
   balance, caps, wizard + process-progress styling).
   ============================================================ */

/* ---------- Font balance ---------- */
body {
  font-size: 16px;
  line-height: 1.65;
}

.nav-anchor {
  font-size: 13px;
}

#inquiry-wizard input,
#inquiry-wizard textarea {
  font-size: 15px;
}


/* ---------- Structural caps ---------- */
.eyebrow-label {
  text-transform: uppercase;
}

.filter-btn {
  text-transform: uppercase;
}

/* ---------- Footer social icons: pure white ---------- */
.footer-social-img {
  filter: brightness(0) invert(1);
}




/* ============================================================
   8b. Work grid — touch reveal (first tap shows the overlay,
   second tap follows the link; wired in work-grid.js)
   ============================================================ */
#projects-grid .work-card.revealed .card-overlay {
  opacity: 1;
}

#projects-grid .work-card.revealed .card-overlay > div {
  transform: translateY(0);
}

/* ============================================================
   10. Services — sticky stacking panels (Design Monks
   "Industry Wins" signature): each panel sticks just below
   the navbar and the next panel slides up and covers it.
   ============================================================ */
.service-panel {
  position: sticky;
  top: 84px;
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.5), 0 24px 48px rgba(0, 0, 0, 0.35);
}

@media (min-width: 1024px) {
  .service-panel {
    top: 104px;
  }
}

/* ============================================================
   10b. Process scroll-progress dots
   ============================================================ */
.process-dot {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.process-dot.active {
  background-color: #6650d7;
  border-color: #6650d7;
  box-shadow: 0 0 0 4px rgba(102, 80, 215, 0.18);
}

/* ============================================================
   11. Contact wizard
   ============================================================ */
#wiz-body {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wiz-choice {
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.wiz-choice:hover {
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.wiz-choice.selected {
  border-color: #6650d7;
  background: rgba(102, 80, 215, 0.16);
  color: #ffffff;
}

/* Country picker (WhatsApp step) */
#wiz-country-panel {
  scrollbar-width: thin;
}

.wiz-country-item {
  transition: background-color 0.15s ease;
}

.wiz-country-item:hover,
.wiz-country-item.active {
  background: rgba(255, 255, 255, 0.07);
}

/* mzmedia-style up/down step navigation (inside the step action row) */
.wiz-nav-btn {
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.wiz-nav-btn:hover {
  background: #e7e7e7;
}

.wiz-nav-btn:active {
  transform: scale(0.94);
}

.wiz-nav-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================
   12. Chat widget (bottom-right) — panel/teaser show-hide states,
   message bubbles and the WhatsApp action bubble
   ============================================================ */
#chat-panel {
  transform-origin: bottom right;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

#chat-teaser {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#chat-panel.chat-hidden {
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
}

#chat-teaser.chat-hidden {
  opacity: 0;
  transform: translateX(14px);
  pointer-events: none;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg-bot {
  background: #1b1b21;
  color: #F7F5F2;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.chat-msg-user {
  background: #6650d7;
  color: #ffffff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-msg-action {
  background: #22c55e;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  align-self: stretch;
  max-width: 100%;
  transition: background-color 0.2s ease;
}

.chat-msg-action:hover {
  background: #16a34a;
}

#chat-messages {
  scrollbar-width: thin;
}

@keyframes wizShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

.wiz-shake {
  animation: wizShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}


/* ============================================================
   0. Brand tokens
   ============================================================ */
:root {
  --brand: #6650d7;
  --brand-300: #A396E7;
  --brand-100: #E0DCF7;
  --brand-50: #EFEEFB;
  --brand-900: #33286C;
  --ink: #000000;
  --ivory: #F7F5F2;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background-color: var(--ink);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--brand); color: #fff; }

/* Font balance: the Englisch italic has a smaller x-height than Syne,
   so italic accent words inside headings get a touch more size. */
h1 .font-italic-serif,
h2 .font-italic-serif {
  font-size: 1.1em;
  letter-spacing: -0.005em;
  line-height: inherit;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ============================================================
   1. Buttons — mzmedia.digital CTA:  [ LABEL ][ ↗ ]
   Letters roll up (staggered) on hover; the arrow shoots out
   top-right while a fresh one slides in from bottom-left.
   Markup is generated by js/components/button-fx.js.
   ============================================================ */
.bfx {
  display: inline-flex !important;
  align-items: stretch;
  gap: 4px;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transform: none !important;
  overflow: visible !important;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bfx-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo), color 0.35s var(--ease-out-expo);
}

.bfx.w-full .bfx-label { flex: 1; }

.bfx-text { display: inline-flex; }

.bfx-char {
  display: inline-block;
  overflow: hidden;
  height: 1.25em;
  line-height: 1.25em;
  vertical-align: top;
}

.bfx-char > span {
  display: inline-block;
  text-shadow: 0 1.25em 0 currentColor;
  transition: transform 0.6s var(--ease-out-expo);
  transition-delay: calc(var(--i) * 14ms);
}

.bfx-space { display: inline-block; width: 0.34em; }

.bfx:hover .bfx-char > span,
.bfx:focus-visible .bfx-char > span {
  transform: translateY(-1.25em);
}

.bfx-arrow {
  position: relative;
  flex: none;
  width: 44px;
  border-radius: 8px;
  overflow: hidden;
  transition: background-color 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo);
}

.bfx-arrow-a,
.bfx-arrow-b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 0.55s var(--ease-out-expo);
}

.bfx-arrow svg { width: 16px; height: 16px; }
.bfx-arrow-b { transform: translate(-110%, 110%); }
.bfx:hover .bfx-arrow-a,
.bfx:focus-visible .bfx-arrow-a { transform: translate(110%, -110%); }
.bfx:hover .bfx-arrow-b,
.bfx:focus-visible .bfx-arrow-b { transform: translate(0, 0); transition-delay: 0.05s; }

.bfx:focus-visible { outline: none; }
.bfx:focus-visible .bfx-label { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--brand-300); }

.bfx:active .bfx-label,
.bfx:active .bfx-arrow { transform: scale(0.97); }

/* Primary — ivory label + violet arrow box */
.btn-luxury .bfx-label { background: var(--ivory); color: var(--ink); }
.btn-luxury .bfx-arrow { background: var(--brand); color: #fff; }
.btn-luxury:hover .bfx-label { background: #ffffff; }
.btn-luxury:hover .bfx-arrow { background: #7561e0; }

/* Secondary — outline label + outline arrow box */
.btn-luxury-secondary .bfx-label,
.btn-luxury-secondary .bfx-arrow {
  border: 1px solid rgba(247, 245, 242, 0.35);
  color: var(--ivory);
}
.btn-luxury-secondary:hover .bfx-label,
.btn-luxury-secondary:hover .bfx-arrow {
  border-color: var(--brand-300);
  background: rgba(102, 80, 215, 0.12);
}

/* Up-next (details page) — black label */
.btn-up-next .bfx-label { background: var(--ink); color: var(--ivory); border: 1px solid rgba(247, 245, 242, 0.3); }
.btn-up-next .bfx-arrow { background: var(--brand); color: #fff; }

/* Header CTA — compact, no arrow */
.nav-cta .bfx-label { background: var(--ivory); color: var(--ink); padding: 13px 20px; }
.nav-cta:hover .bfx-label { background: #ffffff; }

@media (max-width: 639px) {
  .bfx-label { padding: 15px 20px; }
}

/* ============================================================
   2. Hero — mzmedia order + entrance + scroll-scale panel
   (the scroll-linked scale itself is set from index.html JS)
   ============================================================ */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroPanelIn {
  from { opacity: 0; transform: translateY(60px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroImgSettle {
  from { transform: scale(1.15); }
  to { transform: scale(1); }
}

@keyframes heroFadeIn { from { opacity: 0; } to { opacity: 1; } }

#hero .hero-badge { animation: heroFadeUp 0.9s var(--ease-out-expo) 0.05s both; }
#hero h1 { animation: heroFadeUp 1s var(--ease-out-expo) 0.15s both; }
#hero .hero-sub { animation: heroFadeUp 1s var(--ease-out-expo) 0.3s both; }
#hero .hero-cta { animation: heroFadeUp 1s var(--ease-out-expo) 0.42s both; }
#hero-portrait-wrapper { animation: heroPanelIn 1.4s var(--ease-out-expo) 0.5s both; }
#hero-portrait-img { animation: heroImgSettle 2s var(--ease-out-expo) 0.5s both; }
#marquee-container { animation: heroFadeIn 1s ease-out 0.9s both; }

/* ============================================================
   3. Client Stories — stacked deck (Design Monks style)
   ============================================================ */
.story-deck { touch-action: pan-y; user-select: none; }

.story-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 36px;
  padding: 28px;
  background: linear-gradient(160deg, #13111f 0%, #0b0a12 100%);
  border: 1px solid rgba(163, 150, 231, 0.18);
  border-radius: 22px;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
  transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease-out-expo), opacity 0.45s ease, filter 0.45s ease;
  will-change: transform;
}

.story-card:not(.is-active) { filter: brightness(0.5) saturate(0.7); }

.story-photo {
  border-radius: 14px;
  overflow: hidden;
  background: #15131f;
  min-height: 300px;
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  pointer-events: none;
}

.story-body { display: flex; flex-direction: column; padding: 6px 8px 2px 0; }

.story-quote-mark {
  font-family: 'Englisch', 'Playfair Display', serif;
  font-style: italic;
  font-size: 76px;
  line-height: 0.75;
  height: 40px;
  color: var(--brand);
}

.story-quote {
  margin-top: 10px;
  margin-bottom: 28px;
  font-size: 19px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--ivory);
}

.story-author {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(247, 245, 242, 0.08);
}

.story-avatar {
  display: none;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 18%;
}

.story-name {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--ivory);
  line-height: 1.25;
}

.story-role { margin-top: 3px; font-size: 14px; color: var(--brand-300); }

.story-nav {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(163, 150, 231, 0.45);
  color: var(--ivory);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.story-nav:hover { background: var(--brand); border-color: var(--brand); }
.story-nav:active { transform: scale(0.94); }
.story-nav.absolute:active { transform: translateY(-50%) scale(0.94); }

@media (max-width: 767px) {
  .story-card { grid-template-columns: 180px 1fr; gap: 24px; padding: 22px; }
  .story-quote { font-size: 17px; }
}

@media (max-width: 639px) {
  .story-card { grid-template-columns: 1fr; gap: 0; padding: 24px 22px; border-radius: 18px; }
  .story-photo { display: none; }
  .story-avatar { display: block; }
  .story-quote-mark { font-size: 60px; height: 32px; }
  .story-quote { font-size: 16px; line-height: 1.7; margin-bottom: 22px; }
  .story-name { font-size: 17px; }
  .story-role { font-size: 13px; }
}

/* ============================================================
   4. Why Choose Me — line icons in brand tint
   ============================================================ */
.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--brand-300);
  background: rgba(102, 80, 215, 0.14);
  border: 1px solid rgba(163, 150, 231, 0.22);
  margin-bottom: 22px;
}
.why-icon svg { width: 24px; height: 24px; }

.why-card {
  background: linear-gradient(160deg, #121019 0%, #0b0a10 100%);
  border: 1px solid rgba(247, 245, 242, 0.06);
  transition: border-color 0.35s ease, transform 0.35s var(--ease-out-expo);
}
.why-card:hover { border-color: rgba(163, 150, 231, 0.35); transform: translateY(-3px); }

/* ============================================================
   5. Work filters — swipeable single row on phones
   ============================================================ */
@media (max-width: 639px) {
  #category-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  #category-filters::-webkit-scrollbar { display: none; }
  #category-filters .filter-btn { flex: none; padding-top: 11px; padding-bottom: 11px; }
}

/* ============================================================
   6. Mobile rhythm — even vertical spacing, readable sizes
   ============================================================ */
@media (max-width: 639px) {
  body { font-size: 16px; }
  section h2.font-heading { line-height: 1.12; }
  #process-steps { row-gap: 0; }
  .eyebrow-label { font-size: 11px; letter-spacing: 0.2em; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #hero .hero-badge,
  #hero h1,
  #hero .hero-sub,
  #hero .hero-cta,
  #hero-portrait-wrapper,
  #hero-portrait-img,
  #marquee-container {
    animation: none !important;
  }
  #hero-media { transform: none !important; }
  .bfx-char > span,
  .bfx-arrow-a,
  .bfx-arrow-b,
  .story-card { transition: none !important; }
  #wiz-body { transition: none; }
  .wiz-shake { animation: none; }
}

/* ============================================================
   7. Oct 23 (pm) revision
   ============================================================ */

/* Header — transparent glass (mzmedia) */
.nav-glass {
  background: rgba(12, 12, 16, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
          backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(247, 245, 242, 0.09);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Every button label: identical type (DM Sans 600, 12px, 0.14em caps) */
.bfx-label { font-size: 12px !important; letter-spacing: 0.14em !important; font-weight: 600 !important; }

/* Hero trust pill (mzmedia "Creator of … Videos >") */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(247, 245, 242, 0.07);
  background: #0a0a0d;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.3s ease;
}
.trust-pill:hover { border-color: rgba(247, 245, 242, 0.16); }
.trust-faces { display: inline-flex; }
.trust-face {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid #0a0a0d;
  margin-left: -8px;
}
.trust-face:first-child { margin-left: 0; }
.trust-chevron { width: 14px; height: 14px; color: rgba(247, 245, 242, 0.55); }
@media (max-width: 639px) {
  .trust-pill { font-size: 11.5px; gap: 7px; padding: 6px 9px 6px 11px; white-space: nowrap; max-width: 100%; }
  .trust-face { width: 22px; height: 22px; }
  .trust-chevron { width: 12px; height: 12px; }
}

/* Client Stories — wider card, photo kept at a fixed 4:5 portrait */
.story-card { grid-template-columns: 280px 1fr; gap: 40px; padding: 30px; align-items: center; }
.story-photo { min-height: 0; aspect-ratio: 4 / 5; align-self: center; }
.story-body { align-self: stretch; padding-top: 4px; }
@media (max-width: 767px) {
  .story-card { grid-template-columns: 190px 1fr; gap: 24px; padding: 22px; }
}
@media (max-width: 639px) {
  .story-card { grid-template-columns: 1fr; gap: 0; padding: 22px 20px; }
}

/* About — frame follows the text column height on desktop */
@media (min-width: 1024px) {
  .about-frame { min-height: 560px; }
}

/* Chat launcher — violet speech-bubble outline with Raihan's photo */
.chat-launcher {
  position: relative;
  display: block;
  width: 66px;
  height: 66px;
  color: var(--brand);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s var(--ease-out-expo);
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher:active { transform: scale(0.95); }
.chat-launcher:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 4px; border-radius: 999px; }
.chat-launcher-photo {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
}
.chat-launcher-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* Teaser — three bubbles that pop in one after another */
.chat-teaser { pointer-events: none; }
.chat-teaser.is-visible { pointer-events: auto; }
.chat-teaser-bubble {
  max-width: 230px;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: #ffffff;
  color: #111;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.35s ease, transform 0.45s var(--ease-out-expo);
}
.chat-teaser-bubble.is-in { opacity: 1; transform: none; }
.chat-teaser-close {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #e5e5e5;
  background: rgba(30, 30, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.chat-teaser.is-visible .chat-teaser-close { opacity: 1; }

/* Typing indicator */
.chat-typing { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; }
.chat-typing span {
  width: 6px; height: 6px; border-radius: 999px; background: #8a8a96;
  animation: chatDot 1s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatDot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Direct WhatsApp link under the message box */
.chat-wa-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px 12px;
  font-size: 12.5px;
  color: #4ade80;
  text-decoration: none;
  transition: color 0.2s ease;
}
.chat-wa-link:hover { color: #86efac; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .chat-teaser-bubble, .chat-typing span { transition: none; animation: none; }
}

/* ============================================================
   8. Oct 24 revision
   ============================================================ */

/* Nav links — mzmedia: plain 14px text, dimmed; active = full white */
.nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(247, 245, 242, 0.6);
  transition: color 0.25s ease;
}
.nav-link:hover,
.nav-link.is-active { color: #ffffff; }

/* Client Stories — progress dots */
.story-dots { display: flex; align-items: center; gap: 8px; }
.story-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(247, 245, 242, 0.22);
  transition: width 0.45s var(--ease-out-expo), background-color 0.3s ease;
}
.story-dot:hover { background: rgba(247, 245, 242, 0.45); }
.story-dot.is-active { width: 28px; background: var(--brand); }
.story-dot:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 3px; }

/* About — the corner cut hugs the two social chips only */
.about-cut {
  width: auto;
  height: auto;
  border-top-right-radius: 18px;
}
.about-cut::after,
.about-cut::before {
  /* concave fillets so the cut curves into the photo edges */
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle at 100% 0, transparent 17.5px, #000 18px);
  pointer-events: none;
}
.about-cut::before { left: 0; top: -18px; }
.about-cut::after { right: -18px; bottom: 0; }

/* Memorable gallery — draggable rows */
.drag-viewport { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.drag-viewport.is-dragging { cursor: grabbing; }
.drag-stream { width: max-content; will-change: transform; }
.drag-stream img { -webkit-user-drag: none; pointer-events: none; }

/* Project gallery — controls on the image */
.gallery-frame { max-width: 100%; }
.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background-color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}
.gallery-nav:hover { background: var(--brand); border-color: var(--brand); }
.gallery-nav:active { transform: scale(0.94); }
.gallery-nav-prev { left: 14px; }
.gallery-nav-next { right: 14px; }
.gallery-count {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  transform: translateX(-50%);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
@media (max-width: 639px) {
  .gallery-nav { width: 38px; height: 38px; margin-top: -19px; }
  .gallery-nav-prev { left: 8px; }
  .gallery-nav-next { right: 8px; }
  .gallery-count { bottom: 8px; font-size: 11px; padding: 4px 10px; }
}

/* Latest Portfolio — tap-revealed caption on touch screens */
a.revealed .latest-overlay { opacity: 1 !important; }
a.revealed .latest-overlay > div { transform: translateY(0) !important; }

/* Back-to-top — transparent glass */
#back-to-top-btn {
  background: rgba(10, 10, 14, 0.35) !important;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-color: rgba(247, 245, 242, 0.18) !important;
}

/* iPhone: stop the page drifting sideways. iOS Safari lets the page pan
   horizontally if anything is even 1px wider than the screen, even with
   overflow-x hidden on body — clip on both html and body fixes it. */
html, body { overflow-x: hidden; max-width: 100%; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
main, footer { overflow-x: clip; }
@media (max-width: 639px) {
  #category-filters { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* Client Stories — project tag next to the quote mark */
.story-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.story-project {
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(163, 150, 231, 0.28);
  color: var(--brand-300);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 639px) { .story-project { font-size: 10px; padding: 4px 8px; } }

/* ============================================================
   9. Typography — Syne (titles) + DM Sans (body)
      + Englisch Italic (accent words). Calm, premium scale:
      medium weight titles, slightly tight tracking, relaxed body.
   ============================================================ */
h1, h2, h3, h4, .font-heading {
  font-family: 'Syne', 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-kerning: normal;
}
h1 { letter-spacing: -0.02em; line-height: 1.08; }
h2 { line-height: 1.14; }
h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }

/* Syne is wide, so the italic accent needs a bit more size */
h1 .font-italic-serif,
h2 .font-italic-serif { font-size: 1.12em; letter-spacing: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  font-optical-sizing: auto;
  line-height: 1.65;
}
/* DM Sans Light reads thin on black; lift it slightly */
p.font-light, li.font-light, span.font-light, div.font-light { font-weight: 350; }
p { letter-spacing: 0.002em; }

@media (max-width: 639px) {
  section h2.font-heading { line-height: 1.15; }
  h3 { line-height: 1.28; }
}

/* ============================================================
   10. Smooth scroll (Lenis) — required base styles
   ============================================================ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
#hero-media { backface-visibility: hidden; }

/* Very narrow phones: keep the whole trust line on one row */
@media (max-width: 379px) {
  .trust-face:nth-child(n+4) { display: none; }
  .trust-pill { font-size: 11px; gap: 6px; }
}

/* Project gallery — controls sit in the section header (like the
   testimonial arrows), the frame spans the full content width. */
.gallery-ctrl {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(247, 245, 242, 0.14);
  background: rgba(247, 245, 242, 0.03);
  color: var(--ivory);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.gallery-ctrl:hover { background: var(--brand); border-color: var(--brand); }
.gallery-ctrl:active { transform: scale(0.94); }
.gallery-count-inline {
  font-size: 13px; letter-spacing: 0.08em; color: rgba(247, 245, 242, 0.7);
  font-variant-numeric: tabular-nums; margin-right: 4px;
}
@media (max-width: 639px) {
  .gallery-ctrl { width: 40px; height: 40px; }
  .gallery-count-inline { font-size: 12px; }
}

/* Contact form: stop the browser's autofill / suggestion preview from
   painting a white box behind the text. Keeps the field transparent
   on the dark card with ivory text. */
#inquiry-wizard input,
#inquiry-wizard textarea { background-color: transparent !important; color: var(--ivory); caret-color: var(--brand-300); }
#inquiry-wizard input:-webkit-autofill,
#inquiry-wizard input:-webkit-autofill:hover,
#inquiry-wizard input:-webkit-autofill:focus,
#inquiry-wizard input:-webkit-autofill:active,
#inquiry-wizard input:autofill,
#inquiry-wizard textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory) !important;
  caret-color: var(--brand-300);
  -webkit-box-shadow: 0 0 0 1000px #0a0a0d inset !important;
          box-shadow: 0 0 0 1000px #0a0a0d inset !important;
  transition: background-color 9999s ease-out 0s;
}
#inquiry-wizard input::selection,
#inquiry-wizard textarea::selection { background: rgba(102, 80, 215, 0.55); color: #fff; }
