/* ============================================================
   CONTACT MODAL — global, opens from every CTA
   Self-contained brand palette so it looks identical on every
   page (case studies override --accent, the modal must not).
   ============================================================ */
.cm-root {
  /* adopt the case-study theme accent when present (render_theme sets --cm-theme-*); else brand orange */
  --cm-accent: var(--cm-theme-accent, #d97757); --cm-accent-dk: var(--cm-theme-dk, #c15f3c); --cm-accent-rgb: var(--cm-theme-rgb, 217,119,87);
  --cm-bg: #15110c; --cm-bg-2: #271f18; --cm-line: rgba(255,255,255,.09);
  --cm-text: #efece8; --cm-muted: #9b9189;
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(10px, 2vw, 22px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s ease, visibility .35s;
  font-family: 'Hanken Grotesk', sans-serif;
}
.cm-root.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.cm-backdrop {
  position: absolute; inset: 0;
  background: rgba(8,6,5,.72); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
}

.cm {
  position: relative; z-index: 1;
  width: min(860px, 100%); max-height: calc(100vh - clamp(16px, 4vw, 40px));
  display: flex; padding: 7px;
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.012)); color: var(--cm-text);
  border: 1px solid rgba(255,255,255,.1); border-radius: 29px;
  box-shadow: 0 60px 140px -46px rgba(0,0,0,.9), 0 0 150px -52px rgba(var(--cm-accent-rgb),.2);
  transform: translateY(22px) scale(.985); transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.cm-root.is-open .cm { transform: none; }

.cm__core { flex: 1; min-width: 0; min-height: 0; position: relative; display: grid; grid-template-columns: .86fr 1fr;
  border-radius: 22px; overflow: hidden; background: linear-gradient(157deg, #221a13, #130f0a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }

.cm__x {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1.5rem; line-height: 1;
  color: var(--cm-text); background: rgba(255,255,255,.05); border: 1px solid var(--cm-line);
  transition: background .2s, transform .2s;
}
.cm__x:hover { background: rgba(255,255,255,.1); transform: rotate(90deg); }

/* ---- left rail ---- */
.cm__rail {
  padding: clamp(20px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 12px;
  min-height: 0; overflow-y: auto;
  background:
    radial-gradient(130% 85% at 0% 0%, rgba(var(--cm-accent-rgb),.2), transparent 60%),
    linear-gradient(180deg, #1f1913, #14100c);
  border-right: 1px solid var(--cm-line);
}
.cm__eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: 'Schibsted Grotesk', sans-serif;
  font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cm-accent); }
.cm__eyebrow i { width: 20px; height: 1.5px; background: var(--cm-accent); display: inline-block; }
.cm__title { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; line-height: 1.08;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem); letter-spacing: -.02em; margin: 2px 0 0; }
.cm__title em { font-style: normal; color: var(--cm-accent); }
.cm__lead { color: var(--cm-muted); font-size: .96rem; line-height: 1.6; margin-top: 12px; }
.cm__direct { margin-top: 26px; }
.cm__mail { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.cm__mail > a { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 500; font-size: 1.14rem; color: var(--cm-text); text-decoration: none; letter-spacing: -.01em; transition: color .3s; }
.cm__mail > a:hover { color: var(--cm-accent); }
.cm__mail-cp { width: 30px; height: 30px; margin-right: 0; }
.cm__links { display: flex; flex-direction: column; gap: 11px; margin-top: 18px; }
.cm__links a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--cm-muted); font-size: .96rem; text-decoration: none; transition: color .3s; }
.cm__links a:hover { color: var(--cm-text); }
.cm__links a i { color: #776c5f; font-style: normal; transition: transform .3s, color .3s; }
.cm__links a:hover i { color: var(--cm-accent); transform: translate(2px,-2px); }

.cm__contacts { display: grid; gap: 9px; margin-top: 2px; }
.cm__contact { display: flex; align-items: center; border-radius: 13px;
  border: 1px solid var(--cm-line); background: rgba(255,255,255,.025);
  transition: border-color .2s, background .2s, transform .2s; }
.cm__contact:hover { border-color: rgba(var(--cm-accent-rgb),.5); background: rgba(var(--cm-accent-rgb),.08); transform: translateX(3px); }
.cm__contact-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; text-decoration: none; color: var(--cm-text); }
.cm__contact-ic { font-size: 1.15rem; flex: none; }
.cm__contact-tx { min-width: 0; }
.cm__contact-tx b { display: block; font-size: .92rem; font-weight: 600; }
.cm__contact-tx small { display: block; font-size: .78rem; color: var(--cm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm__copy { flex: none; margin-right: 7px; width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center; position: relative;
  background: rgba(255,255,255,.05); border: 1px solid var(--cm-line); color: var(--cm-muted);
  transition: background .2s, color .2s, border-color .2s; }
.cm__copy svg { width: 15px; height: 15px; }
.cm__copy:hover { background: rgba(var(--cm-accent-rgb),.16); color: var(--cm-accent); border-color: rgba(var(--cm-accent-rgb),.4); }
.cm__copy.is-copied { color: #2b7d50; border-color: rgba(127,201,154,.5); background: rgba(127,201,154,.12); }
/* "Copied!" tooltip (shared by modal + homepage copy buttons) */
.cm__copy.is-copied::after, .ct2__copy.is-copied::after {
  content: "Copied!"; position: absolute; bottom: calc(100% + 7px); right: 0;
  padding: 4px 9px; border-radius: 7px; font-size: .72rem; font-weight: 600; white-space: nowrap;
  background: #2a2521; color: #fff; box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); pointer-events: none; z-index: 5; }

.cm__badge { margin-top: auto; flex: none; padding: 14px 16px; border-radius: 13px;
  background: rgba(var(--cm-accent-rgb),.10); border: 1px solid rgba(var(--cm-accent-rgb),.26); }
.cm__badge strong { display: block; font-size: .9rem; color: #f0c9b6; }
.cm__badge span { display: block; font-size: .78rem; color: var(--cm-muted); margin-top: 3px; }

/* ---- right main ---- */
.cm__main { display: flex; flex-direction: column; min-height: 0; background: var(--cm-bg); }
.cm__view { display: none; padding: clamp(13px, 1.6vw, 18px) clamp(20px, 2.4vw, 32px) clamp(14px, 1.8vw, 20px);
  overflow-y: auto; flex: 1; min-height: 0; }
.cm__view.is-active { display: block; }

/* view heading (replaces the old tabs) */
.cm__vhead { font-family: 'Schibsted Grotesk', sans-serif; font-size: 1.14rem; font-weight: 700; color: var(--cm-text); }
.cm__vsub { color: var(--cm-muted); font-size: .85rem; line-height: 1.45; margin: 3px 0 11px; }

/* "or" divider + secondary Book-a-call button under Send message */
.cm__or { display: flex; align-items: center; gap: 12px; margin: 8px 0;
  font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9b9189; }
.cm__or::before, .cm__or::after { content: ""; flex: 1; height: 1px; background: var(--cm-line); }
.cm__callbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 11px 22px; border-radius: 100px; cursor: pointer;
  font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: var(--cm-accent);
  background: transparent; border: 1.5px solid rgba(var(--cm-accent-rgb),.5);
  transition: background .25s, color .25s, border-color .25s, transform .2s; }
.cm__callbtn:hover { background: var(--cm-accent); color: #fff; border-color: var(--cm-accent); transform: translateY(-2px); }

/* back-to-form button (Calendly view) */
.cm__back { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 16px;
  padding: 9px 16px 9px 12px; border-radius: 100px;
  background: rgba(255,255,255,.05); border: 1px solid var(--cm-line); color: var(--cm-text);
  font-family: 'Schibsted Grotesk', sans-serif; font-weight: 600; font-size: .9rem;
  transition: background .2s, border-color .2s, color .2s; }
.cm__back:hover { background: rgba(var(--cm-accent-rgb),.12); border-color: rgba(var(--cm-accent-rgb),.4); color: var(--cm-accent); }
.cm__back span { font-size: 1.15em; line-height: 1; }

/* ---- form ---- */
.cm-form { display: grid; gap: 8px; }
.cm-form .cm-field { gap: 4px; }
.cm-form .cm-field label { font-size: .76rem; }
.cm-form .cm-field input, .cm-form .cm-field select, .cm-form .cm-field textarea { padding: 8px 12px; font-size: .9rem; }
.cm-form .cm-field textarea { min-height: 42px; }
.cm-form .cm-submit { margin-top: 1px; padding: 11px 24px; }
.cm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cm-field { display: grid; gap: 6px; }
.cm-field label { font-size: .8rem; font-weight: 600; color: var(--cm-muted); letter-spacing: .01em; }
.cm-field input, .cm-field select, .cm-field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--cm-text);
  background: #1c1610; border: 1px solid rgba(255,255,255,.06); border-radius: 13px; padding: 13px 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.45), inset 0 -1px 0 rgba(255,255,255,.03);
  transition: border-color .25s, box-shadow .25s, background .25s; }
.cm-field textarea { resize: vertical; min-height: 96px; }
.cm-field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%23a89b8d' stroke-width='1.7' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.cm-field input::placeholder, .cm-field textarea::placeholder { color: #9b9189; }
.cm-field input:focus, .cm-field select:focus, .cm-field textarea:focus {
  outline: none; border-color: var(--cm-accent); background: #211a12; box-shadow: inset 0 1px 3px rgba(0,0,0,.45), 0 0 0 3px rgba(var(--cm-accent-rgb),.16), 0 8px 22px -10px rgba(var(--cm-accent-rgb),.3); }
.cm-field.is-error input, .cm-field.is-error textarea { border-color: #e0654c; box-shadow: 0 0 0 3px rgba(224,101,76,.16); }
/* honeypot — display:none so browser autofill / password managers never fill it
   (off-screen fields named "company" get autofilled, which falsely tripped the bot check) */
.cm-hp { display: none !important; }

.cm-submit { margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 7px 7px 7px 24px; border: 0; border-radius: 100px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, #e88e62, #d4703f); box-shadow: 0 12px 32px -12px rgba(var(--cm-accent-rgb),.5), inset 0 1px 0 rgba(255,255,255,.22); transition: box-shadow .35s cubic-bezier(.22,1,.36,1), transform .25s; }
.cm-submit:hover { box-shadow: 0 18px 42px -14px rgba(var(--cm-accent-rgb),.62), inset 0 1px 0 rgba(255,255,255,.26); }
.cm-submit:active { transform: scale(.985); }
.cm-submit:disabled { opacity: .6; cursor: default; }
.cm-submit__txt { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 600; font-size: 1rem; }
.cm-submit__ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(50,18,4,.22); display: grid; place-items: center; transition: transform .4s cubic-bezier(.22,1,.36,1), background .4s; }
.cm-submit:hover .cm-submit__ic { transform: translate(3px,-1px) scale(1.05); background: rgba(50,18,4,.32); }
.cm-submit.is-loading .cm-submit__ic { display: none; }

.cm-status { font-size: .9rem; line-height: 1.5; margin: 2px 0 0; min-height: 1px; }
.cm-status.is-ok { color: #5fcf86; }
.cm-status.is-err { color: #e0654a; }

/* ---- calendly view ---- */
.cm-cal { position: relative; min-height: 540px; height: 100%; border-radius: 12px; overflow: hidden; }
.cm-cal__loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 11px;
  color: var(--cm-muted); font-size: .92rem; }
.cm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.14);
  border-top-color: var(--cm-accent); animation: cm-spin .8s linear infinite; }
@keyframes cm-spin { to { transform: rotate(360deg); } }
.cm-cal .calendly-inline-widget { width: 100%; height: 540px; }

/* ---- responsive ---- */
@media (max-width: 760px) {
  .cm-root { padding: 10px; align-items: center; }
  /* one cohesive scroll for the whole modal (no separate rail/form scroll panes) */
  .cm {
    display: flex; flex-direction: column; width: 100%;
    max-height: calc(100dvh - 20px); overflow-y: auto; overflow-x: hidden;
    border-radius: 21px; padding: 6px; -webkit-overflow-scrolling: touch;
  }
  .cm__core { flex: 0 0 auto; display: flex; flex-direction: column; overflow: visible; border-radius: 15px; }
  .cm__rail { display: contents; }
  .cm__rail-head { order: 1; padding: 24px 20px 8px; }
  .cm__main { order: 2; flex: 0 0 auto; overflow: visible; }
  .cm__direct { order: 3; margin-top: 0; padding: 22px 20px 26px; border-top: 1px solid var(--cm-line); }
  .cm__title { font-size: 1.4rem; }
  .cm__lead { font-size: .92rem; margin-top: 10px; }
  .cm__view { flex: 0 0 auto; overflow: visible; padding: 20px; }
  .cm__view:not(.is-active) { display: none; }
  .cm__x { position: fixed; top: 18px; right: 20px; }
  .cm-cal, .cm-cal .calendly-inline-widget { min-height: 440px; height: 440px; }
}

/* prevent background scroll when open */
body.cm-lock { overflow: hidden; }
/* keep the custom cursor above the modal (modal z-index is 9000) */
body.cm-lock .cursor, body.cm-lock .cursor-dot { z-index: 9600; }

/* ============================================================
   INLINE FORM — homepage #contact section (light theme)
   reuses the same JS via [data-contact-form]
   ============================================================ */
.contact-form { display: grid; gap: 15px; }
.contact-form .cm-row { grid-template-columns: 1fr 1fr; }
.contact-form .cm-field label { color: #6b6058; }
.contact-form .cm-field input, .contact-form .cm-field select, .contact-form .cm-field textarea {
  background: #fff; border: 1px solid rgba(28,20,14,.16); color: #1a120c; }
.contact-form .cm-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%239a8f84' stroke-width='1.7' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.contact-form .cm-field input::placeholder, .contact-form .cm-field textarea::placeholder { color: #a99e92; }
.contact-form .cm-field input:focus, .contact-form .cm-field select:focus, .contact-form .cm-field textarea:focus {
  border-color: #c15f3c; box-shadow: 0 0 0 3px rgba(193,95,60,.15); }
.contact-form .cm-submit { background: #c15f3c; color: #fff; }
.contact-form .cm-submit:hover { background: #9a3412; }
.contact-form .cm-status.is-ok { color: #1f7a4d; }
.contact-form .cm-status.is-err { color: #b4441f; }

/* ============================================================
   HOMEPAGE CONTACT SECTION — premium split card (.ct2)
   dark info panel (left) + message form (right)
   ============================================================ */
.ct2 {
  display: grid; grid-template-columns: 1.04fr 1fr; align-items: stretch;
  border-radius: 28px; overflow: hidden; background: #fff;
  border: 1px solid rgba(28,20,14,.10);
  box-shadow: 0 60px 120px -54px rgba(28,20,14,.55);
}

/* left dark panel */
.ct2__aside {
  position: relative; isolation: isolate;
  padding: clamp(30px, 4vw, 54px);
  display: flex; flex-direction: column; gap: 18px;
  color: #f4efe9; font-family: 'Hanken Grotesk', sans-serif;
  background: linear-gradient(165deg, #1d1712 0%, #14100c 58%, #100c09 100%);
}
.ct2__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 50% at 0% 0%, rgba(217,119,87,.22), transparent 62%),
    radial-gradient(52% 42% at 100% 100%, rgba(217,119,87,.10), transparent 72%);
}
.ct2__status {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 100px; font-size: .78rem; font-weight: 600;
  color: #cdebd6; background: rgba(95,207,134,.10); border: 1px solid rgba(95,207,134,.28);
}
.ct2__status i { width: 7px; height: 7px; border-radius: 50%; background: #5fcf86;
  box-shadow: 0 0 10px #5fcf86; animation: ct2pulse 2.2s ease-in-out infinite; }
@keyframes ct2pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.ct2__eyebrow { font-family: 'Schibsted Grotesk', sans-serif; font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: #d97757; margin-top: 2px; }
.ct2__title { font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; line-height: 1.05;
  font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.02em; margin: -6px 0 0; color: #fdfbf8; }
.ct2__title em { font-style: normal; color: #d97757; }
.ct2__lead { color: #b6a899; font-size: 1rem; line-height: 1.6; max-width: 46ch; }

.ct2__methods { display: grid; gap: 10px; margin-top: 4px; }
.ct2__method { display: flex; align-items: center; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  transition: border-color .25s, background .25s, transform .25s; }
.ct2__method:hover { border-color: rgba(217,119,87,.5); background: rgba(217,119,87,.08); transform: translateX(4px); }
.ct2__method-main, .ct2__method--solo { display: flex; align-items: center; gap: 14px; padding: 13px 15px; text-decoration: none; color: #f4efe9; }
.ct2__method-main { flex: 1 1 auto; min-width: 0; }
.ct2__mic { font-size: 1.18rem; flex: none; width: 24px; text-align: center; }
.ct2__mtx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ct2__mtx b { font-size: .95rem; font-weight: 600; }
.ct2__mtx small { font-size: .8rem; color: #9c8f81; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct2__marrow { color: #7a6e62; transition: transform .25s, color .25s; }
.ct2__method:hover .ct2__marrow { color: #d97757; transform: translateX(3px); }
.ct2__copy { flex: none; margin-right: 8px; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center; position: relative;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #b6a899;
  transition: background .2s, color .2s, border-color .2s; }
.ct2__copy svg { width: 16px; height: 16px; }
.ct2__copy:hover { background: rgba(217,119,87,.16); color: #f0c9b6; border-color: rgba(217,119,87,.4); }
.ct2__copy.is-copied { color: #7fc99a; border-color: rgba(127,201,154,.5); background: rgba(127,201,154,.12); }

.ct2__trust { margin-top: auto; padding: 16px 18px; border-radius: 14px;
  background: rgba(217,119,87,.1); border: 1px solid rgba(217,119,87,.24); }
.ct2__trust strong { display: block; font-size: .98rem; color: #f0c9b6; }
.ct2__trust span { display: block; font-size: .82rem; color: #a89b8d; margin-top: 3px; }

/* right form panel */
.ct2__form { padding: clamp(30px, 4vw, 54px); display: flex; flex-direction: column; background: #fff; }
.ct2__fhead { font-family: 'Schibsted Grotesk', sans-serif; font-size: 1.42rem; font-weight: 700; color: #1a120c; }
.ct2__fsub { color: #6b6058; font-size: .96rem; margin: 6px 0 22px; }
.ct2__form .contact-form { gap: 14px; }
.ct2__form .cm-field input, .ct2__form .cm-field select, .ct2__form .cm-field textarea { background: #f7f4ef; }
.ct2__form .cm-field input:focus, .ct2__form .cm-field select:focus, .ct2__form .cm-field textarea:focus { background: #fff; }
.ct2__form .cm-submit { margin-top: 4px; }

/* "or" divider + secondary Book-a-call button under Send message */
.ct2__or { display: flex; align-items: center; gap: 12px; margin: 16px 0;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #9a8f84; }
.ct2__or::before, .ct2__or::after { content: ""; flex: 1; height: 1px; background: rgba(28,20,14,.13); }
.ct2__callbtn { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 100px; text-decoration: none;
  font-family: 'Schibsted Grotesk', sans-serif; font-weight: 700; font-size: 1rem; color: #c15f3c;
  background: #fff; border: 1.5px solid rgba(193,95,60,.45);
  transition: background .25s, color .25s, border-color .25s, transform .2s; }
.ct2__callbtn:hover { background: #c15f3c; color: #fff; border-color: #c15f3c; transform: translateY(-2px); }

@media (max-width: 880px) {
  .ct2 { grid-template-columns: 1fr; border-radius: 22px; }
  .ct2__trust { margin-top: 6px; }
}

/* phones: stack the two-up form rows so fields aren't cramped (both modal + homepage) */
@media (max-width: 600px) {
  .cm-form .cm-row, .contact-form .cm-row { grid-template-columns: 1fr; }
}
