/* MerchyStudio blog design: same header, footer, font and quote banner as the merchystudio.com homepage.
   Every class starts with "ms-" so nothing clashes with the Kadence theme. */

/* Inter: the same self-hosted file as the homepage (browsers reuse it between the site and the blog) */
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ms-blue: #2563EB;
  --ms-blue-deep: #1D4ED8;
  --ms-navy: #0B1B3A;
  --ms-soft: #F5F6F8;
  --ms-line: #E4E7EC;
  --ms-muted: #556070;
  --ms-grey: #6B7689;
  --ms-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Kadence: homepage font everywhere, and the same content width and side margins as the homepage
   (1160px wide, 4% margins), so posts line up with the logo and the footer */
html:root {
  --global-body-font-family: var(--ms-font);
  --global-heading-font-family: var(--ms-font);
  --global-primary-nav-font-family: var(--ms-font);
  --global-content-edge-padding: 4vw;
  --global-content-width: calc(1160px + 8vw);
}
body { -webkit-font-smoothing: antialiased; }
#mobile-drawer { display: none !important; } /* Kadence's own phone menu is replaced by ours */

.ms-wrap { width: min(1160px, 92%); margin: 0 auto; }
.ms-header, .ms-footer, .ms-cta-band, .ms-blog-intro, .ms-wa-float { font-family: var(--ms-font); }
.ms-header *, .ms-footer *, .ms-cta-band * { box-sizing: border-box; }

/* ---------- Buttons ---------- */
.ms-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 700; font-size: .98rem; line-height: 1.2; border: 2px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  cursor: pointer; font-family: var(--ms-font); white-space: nowrap;
}
a.ms-btn:hover { transform: translateY(-2px); text-decoration: none; }
a.ms-btn-primary, a.ms-btn-primary:hover, a.ms-btn-primary:focus { color: #FFFFFF; }
.ms-btn-primary { background: var(--ms-blue); box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .6); }
a.ms-btn-primary:hover { background: var(--ms-blue-deep); }
a.ms-btn-light, a.ms-btn-light:focus { background: #FFFFFF; color: var(--ms-navy); }
a.ms-btn-light:hover { background: var(--ms-soft); color: var(--ms-navy); }
a.ms-btn-outline-light, a.ms-btn-outline-light:focus { background: transparent; color: #FFFFFF; border-color: rgba(255,255,255,.7); }
a.ms-btn-outline-light:hover { background: var(--ms-navy); color: #FFFFFF; border-color: var(--ms-navy); }
a.ms-btn-wa, a.ms-btn-wa:hover, a.ms-btn-wa:focus { color: #FFFFFF; }
.ms-btn-wa { background: #25D366; box-shadow: 0 14px 30px -12px rgba(18, 140, 126, .6); }
a.ms-btn-wa:hover { background: #1EBE5A; }
.ms-btn-wa svg { width: 20px; height: 20px; flex: none; }
.ms-btn-sm { padding: 11px 20px; font-size: .92rem; }
.ms-arrow { transition: transform .2s ease; }
.ms-btn:hover .ms-arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.ms-header {
  position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 30;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.ms-header.is-scrolled { border-bottom-color: var(--ms-line); box-shadow: 0 6px 24px -18px rgba(11, 27, 58, .4); background: rgba(255,255,255,.92); }
@media (max-width: 600px) { .admin-bar .ms-header { top: 0; } } /* WordPress admin bar scrolls away on phones (logged-in only) */
.ms-header .ms-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.ms-brand, .ms-brand:hover { display: flex; align-items: center; text-decoration: none; color: var(--ms-navy); }
.ms-wm { display: inline-flex; align-items: baseline; font-size: 34px; line-height: 1; letter-spacing: -0.035em; white-space: nowrap; font-family: var(--ms-font); }
.ms-wm svg.ms-m { height: .8em; width: auto; flex: none; margin-right: .02em; }
.ms-wm .ms-erchy { font-weight: 700; color: var(--ms-navy); }
.ms-wm .ms-studio { font-weight: 400; color: var(--ms-grey); }
@media (max-width: 560px) { .ms-brand .ms-wm { font-size: 26px; } }

.ms-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.ms-nav li { margin: 0; padding: 0; }
.ms-nav ul a { text-decoration: none; color: var(--ms-muted); font-weight: 600; font-size: .95rem; position: relative; white-space: nowrap; }
.ms-nav ul a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--ms-blue); transition: width .25s ease; }
.ms-nav ul a:hover, .ms-nav ul a:focus, .ms-nav ul a.is-current { color: var(--ms-navy); text-decoration: none; }
.ms-nav ul a:hover::after, .ms-nav ul a.is-current::after { width: 100%; }
.ms-nav-extra { display: none; }

.ms-header-actions { display: flex; align-items: center; gap: 14px; }

/* Phone menu button: round, turns into an X (Kadence's button styles reset) */
.ms-header .ms-menu-toggle { display: none; }
.ms-header .ms-menu-toggle, .ms-header .ms-menu-toggle:hover, .ms-header .ms-menu-toggle:focus, .ms-header .ms-menu-toggle:active {
  width: 46px; height: 46px; min-height: 0; padding: 0; margin: 0; border-radius: 50%;
  border: 1px solid var(--ms-line); background: #FFFFFF; color: var(--ms-navy); box-shadow: none;
  cursor: pointer; position: relative; flex: none; line-height: 1;
}
.ms-header .ms-menu-toggle:focus-visible { outline: 2px solid var(--ms-blue); outline-offset: 3px; }
.ms-menu-toggle__bars, .ms-menu-toggle__bars::before, .ms-menu-toggle__bars::after { position: absolute; left: 50%; width: 18px; height: 2px; background: var(--ms-navy); border-radius: 2px; transition: transform .3s cubic-bezier(.2,.7,.2,1), top .3s cubic-bezier(.2,.7,.2,1), background-color .2s; }
.ms-menu-toggle__bars { top: 50%; transform: translate(-50%, -50%); }
.ms-menu-toggle__bars::before, .ms-menu-toggle__bars::after { content: ""; transform: translateX(-50%); }
.ms-menu-toggle__bars::before { top: -6px; }
.ms-menu-toggle__bars::after { top: 6px; }
.ms-menu-toggle[aria-expanded="true"] .ms-menu-toggle__bars { background: transparent; }
.ms-menu-toggle[aria-expanded="true"] .ms-menu-toggle__bars::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.ms-menu-toggle[aria-expanded="true"] .ms-menu-toggle__bars::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

@media (max-width: 1024px) { .ms-nav ul { gap: 20px; } }
@media (max-width: 1100px) and (min-width: 980px) { .ms-nav ul { gap: 18px; } .ms-nav ul a { font-size: .9rem; } }
@media (max-width: 979px) {
  .ms-header .ms-menu-toggle { display: inline-block; }
  .ms-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 29;
    max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto;
    background: #FFFFFF; border-bottom: 1px solid var(--ms-line);
    padding: 8px 4% 26px;
    box-shadow: 0 30px 40px -30px rgba(11, 27, 58, .35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .25s ease, visibility 0s linear .3s;
  }
  .ms-nav.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .ms-nav ul { flex-direction: column; gap: 0; }
  .ms-nav ul a { display: block; font-size: 1.375rem; font-weight: 700; letter-spacing: -0.015em; color: var(--ms-navy); padding: 15px 2px; border-bottom: 1px solid var(--ms-line); }
  .ms-nav ul a::after { display: none; }
  .ms-nav ul a:hover, .ms-nav ul a.is-current { color: var(--ms-blue); }
  .ms-nav-extra { display: grid; gap: 12px; margin-top: 22px; }
  .ms-nav-extra .ms-btn { width: 100%; justify-content: center; min-height: 54px; font-size: 1.02rem; }
}
@media (max-width: 560px) { .ms-header .ms-header-cta { display: none; } }

/* ---------- Blog home heading ---------- */
.ms-blog-intro { padding-top: 64px; }
.ms-eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--ms-blue); font-weight: 700; margin-bottom: 14px; }
.ms-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--ms-blue); border-radius: 2px; }
.ms-blog-intro h1 { font-family: var(--ms-font); font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; color: var(--ms-navy); margin: 0 0 16px; }
.ms-blog-intro p { color: var(--ms-muted); font-size: 1.1rem; line-height: 1.6; max-width: 60ch; margin: 0; }
.ms-blog-intro + .content-area { margin-top: 2.5rem; }
@media (max-width: 600px) { .ms-blog-intro { padding-top: 36px; } }

/* ---------- Posts: homepage headings, pill buttons, rounded cards ---------- */
.entry-title, .entry-content h1, .entry-content h2, .entry-content h3 { font-weight: 800; letter-spacing: -0.02em; }
.single .entry-header .entry-title { letter-spacing: -0.03em; line-height: 1.1; }
.wp-block-button__link, .entry-content .wp-element-button { border-radius: 999px; font-weight: 700; padding: 14px 26px; }
.content-style-boxed .entry.content-bg, .content-style-boxed .loop-entry.content-bg { border-radius: 18px; }
.loop-entry { border: 1px solid var(--ms-line); box-shadow: 0 24px 48px -28px rgba(11, 27, 58, .25); overflow: hidden; }

/* ---------- Blue quote banner ---------- */
.ms-cta-band { padding: 24px 0 96px; }
.ms-band { background: var(--ms-blue); color: #FFFFFF; border-radius: 30px; padding: 70px 40px; text-align: center; position: relative; overflow: hidden; }
.ms-band::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.08); right: -120px; top: -160px; }
.ms-band .ms-band-title { position: relative; z-index: 1; font-family: var(--ms-font); font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; color: #FFFFFF; margin: 0 0 16px; }
.ms-band .ms-band-text { position: relative; z-index: 1; color: #DCE7FF; max-width: 56ch; margin: 0 auto 28px; font-size: 1.08rem; line-height: 1.6; }
.ms-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
@media (max-width: 800px) { .ms-cta-band { padding-bottom: 72px; } .ms-band { padding: 50px 24px; } }

/* ---------- Footer ---------- */
.ms-footer { background: var(--ms-navy); color: #B7C2D9; padding: 72px 0 34px; font-size: 1rem; line-height: 1.6; }
.ms-footer .ms-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 36px; }
.ms-footer .ms-foot-h { color: #FFFFFF; margin: 0 0 14px; font-size: .95rem; font-weight: 700; line-height: 1.3; }
.ms-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ms-footer li { margin: 0; padding: 0; }
.ms-footer a { text-decoration: none; color: #B7C2D9; }
.ms-footer a:hover, .ms-footer a:focus { color: #FFFFFF; text-decoration: none; }
.ms-footer a.ms-btn-primary { color: #FFFFFF; }
.ms-footer a.ms-btn-primary:hover { color: #E4E7EC; }
.ms-footer .ms-foot-tagline { margin: 0; max-width: 34ch; }
.ms-footer .ms-foot-cta { margin: 18px 0 0; }
.ms-foot-brand { display: flex; align-items: center; margin-bottom: 14px; }
.ms-foot-brand .ms-wm { font-size: 30px; background: #FFFFFF; padding: 12px 18px; border-radius: 14px; }
.ms-foot-brand .ms-wm .ms-erchy { color: #0B1B3A; }
@media (max-width: 560px) { .ms-foot-brand .ms-wm { font-size: 24px; padding: 10px 14px; } }
.ms-footer a.ms-foot-wa { display: inline-flex; align-items: center; gap: 10px; }
.ms-foot-wa__icon { width: 18px; height: 18px; flex: none; color: #25D366; }
.ms-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 24px; padding-bottom: 76px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .9rem; }
@media (max-width: 800px) { .ms-footer .ms-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ms-footer .ms-cols { grid-template-columns: 1fr; } }

/* ---------- Floating WhatsApp button ---------- */
.ms-wa-float {
  position: fixed; z-index: 90;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #FFFFFF; text-decoration: none;
  box-shadow: 0 10px 28px -8px rgba(18, 140, 126, .65), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s cubic-bezier(.2,.7,.2,1), background-color .3s, opacity .3s, visibility .3s;
  animation: msWaIn .6s 1.2s cubic-bezier(.2,.7,.2,1) both;
}
.ms-wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25D366; animation: msWaPulse 2.8s 2s ease-out infinite; pointer-events: none; }
.ms-wa-float:hover, .ms-wa-float:focus { background: #1EBE5A; color: #FFFFFF; text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(18, 140, 126, .75), 0 2px 6px rgba(0, 0, 0, .12); }
.ms-wa-float:focus-visible { outline: 3px solid var(--ms-navy); outline-offset: 3px; }
.ms-wa-float__icon { width: 30px; height: 30px; flex: none; }
.ms-wa-float__label { display: none; font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.ms-wa-float.is-hidden { opacity: 0; visibility: hidden; transform: translateY(16px); }
@keyframes msWaIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes msWaPulse { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.45); opacity: 0; } }
@media (min-width: 900px) {
  .ms-wa-float { width: auto; height: 56px; padding: 0 22px 0 16px; border-radius: 999px; right: 24px; bottom: 24px; }
  .ms-wa-float__icon { width: 26px; height: 26px; }
  .ms-wa-float__label { display: inline; }
  .ms-wa-float::before { display: none; }
}
/* Kadence's "scroll to top" button moves up so it never sits under the WhatsApp button */
#kt-scroll-up, #kt-scroll-up-reader { bottom: 96px !important; }

@media (prefers-reduced-motion: reduce) {
  .ms-header *, .ms-footer *, .ms-cta-band *, .ms-wa-float, .ms-wa-float::before { transition: none !important; animation: none !important; }
}
