/* ==========================================================================
   Sendora — WordPress fit and mobile fixes.
   Loaded after sl-global.css (which is generated from the design export).
   Everything is scoped to the .sl-site shell.
   ========================================================================== */

/* ---------- Astra extras ----------
   Element defaults are reset in sl-global.css. These are Astra components
   printed on every page. */
/* Astra's own back-to-top button (the design has one in the footer).
   !important: Astra's script sets display inline on scroll. */
.sl-page #ast-scroll-top { display: none !important; }

/* Astra styles input[type="search"] at (0,1,1), above the design's class rule.
   Same declarations as .sl-search__input in sl-global.css, one level heavier. */
.sl-search .sl-search__input { border: 0; border-radius: 0; box-shadow: none; outline: none; background: transparent; font-family: inherit; font-size: 16px; color: var(--sl-ink); padding: 14px 0; }
.sl-site { font-family: var(--sl-font); font-size: 16px; line-height: normal; overflow-x: clip; }

/* WordPress admin bar (logged-in only): keep the sticky header below it. */
.admin-bar .sl-header { top: 32px; }
.admin-bar .sl-menu { top: 32px; }
@media (max-width: 782px) { .admin-bar .sl-header, .admin-bar .sl-menu { top: 46px; } }

/* ---------- Blog post body written in the WordPress editor ----------
   Mirrors .sl-article__h2 / __p from the design for plain editor markup. */
.sl-article > div:not(.sl-inline-cta) > :is(h2, h3) { margin: clamp(26px, 3vw, 40px) 0 12px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
.sl-article > div:not(.sl-inline-cta) > h3 { font-size: clamp(19px, 1.8vw, 23px); }
.sl-article > div:not(.sl-inline-cta) > :is(h2, h3):first-child { margin-top: 0; }
.sl-article > div:not(.sl-inline-cta) > :is(p, ul, ol) { margin: 0 0 14px; font-size: clamp(16.5px, 1.4vw, 18px); line-height: 1.75; color: rgba(10, 10, 11, .78); text-wrap: pretty; }
.sl-article > div:not(.sl-inline-cta) > :is(ul, ol) { padding-left: 1.2em; }
.sl-article > div:not(.sl-inline-cta) a { color: var(--sl-lime-deep); text-underline-offset: 3px; }
.sl-article > div:not(.sl-inline-cta) img { height: auto; border-radius: var(--sl-radius); margin: 8px 0 18px; }

/* Images and inline code in posts. Figures lose the browser's 40px side
   margins so charts use the full column (they were shrunk on phones). */
.sl-article > div:not(.sl-inline-cta) > figure { margin: 22px 0 26px; }
.sl-article > div:not(.sl-inline-cta) > figure img { width: 100%; margin: 0; }
.sl-article figcaption { margin: 10px 2px 0; font-size: 14px; line-height: 1.5; color: rgba(10, 10, 11, .6); text-wrap: pretty; }
.sl-article code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; padding: .12em .4em; border-radius: 4px; background: rgba(10, 10, 11, .06); overflow-wrap: anywhere; }

/* ---------- List and definition resets the design export missed ----------
   The element reset brings back the browser's 40px list indent and bullets,
   which pushed card grids and chip rows off their columns. Element weight,
   so component classes (e.g. .sl-rail-mobile padding) still win. */
:where(.sl-site) ul:where(.sl-cards, .sl-chip-row) { list-style: none; padding-left: 0; }
:where(.sl-site) dd { margin-inline-start: 0; }

/* Service photos are 16:9; a 4:3 box cut the logos off at the sides. */
.sl-site .sl-service__media { aspect-ratio: 16 / 9; }

/* Review cards fill their grid cell, so short quotes are not narrower. */
.sl-reviews > li > .sl-review { flex: 1 1 auto; min-width: 0; }

/* ---------- Blog post tables ----------
   assets/js/sl-tables.js wraps each table in .sl-table > .sl-table__scroll,
   marks number columns with .sl-num and adds .sl-table--more while there is
   more table to scroll to. Without the script the table still reads well. */
.sl-article > div:not(.sl-inline-cta) > table,
.sl-table { margin: 22px 0 28px; }
.sl-table { position: relative; border: 1px solid var(--sl-line); border-radius: var(--sl-radius); background: var(--sl-white); }
.sl-table__scroll { overflow-x: auto; border-radius: inherit; overscroll-behavior-x: contain; }
.sl-table__scroll:focus-visible { outline: 2px solid var(--sl-lime-deep); outline-offset: 2px; }
.sl-article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; color: var(--sl-ink); font-variant-numeric: tabular-nums; }
.sl-article :is(th, td) { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sl-line); }
.sl-article thead th { vertical-align: bottom; padding-top: 14px; padding-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .03em; line-height: 1.3; text-transform: uppercase; color: rgba(10, 10, 11, .62); background: color-mix(in srgb, var(--sl-ink) 4%, var(--sl-white)); text-wrap: balance; min-width: 4.5em; }
.sl-article :is(th, td):first-child { min-width: 9em; }
.sl-article tbody td:first-child { font-weight: 600; }
.sl-article tbody tr:last-child > * { border-bottom: 0; }
.sl-article tbody tr:nth-child(even) > * { background: color-mix(in srgb, var(--sl-ink) 1.5%, var(--sl-white)); }
.sl-article tbody tr:nth-child(odd) > * { background: var(--sl-white); }
.sl-article .sl-num { text-align: right; white-space: nowrap; }
.sl-article thead th.sl-num { white-space: normal; }
.sl-table::after { content: ""; position: absolute; top: 1px; right: 0; bottom: 1px; width: 32px; border-radius: 0 var(--sl-radius) var(--sl-radius) 0; background: linear-gradient(to right, rgba(10, 10, 11, 0), rgba(10, 10, 11, .1)); opacity: 0; transition: opacity .2s ease; pointer-events: none; }
.sl-table--more::after { opacity: 1; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1024px) {
	/* Sideways reveals pushed content past the screen edge while animating,
	   which let the page wobble left and right on phones. Rise up instead. */
	.sl-js [data-reveal="left"],
	.sl-js [data-reveal="right"] { transform: translateY(20px); }
}

@media (max-width: 768px) {
	/* Touch targets: at least 44px tall/wide (Apple and Google guidance). */
	.sl-dots__btn { width: 44px; height: 44px; }
	/* Hero clip dots: no room beside the hero button on phones, and the clips
	   change every few seconds on their own, so the dots are hidden here. */
	.sl-site .sl-clips { display: none; }
	.sl-footer__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
	.sl-back { display: inline-flex; align-items: center; min-height: 44px; }
	.sl-footer__nav--inline .sl-footer__link { padding: 12px 0; }
	/* Blog post tables: smaller type, text columns keep a readable width and
	   the table scrolls sideways; the first column stays pinned on the left. */
	.sl-article table { font-size: 14px; }
	.sl-article :is(th, td) { padding: 10px 12px; }
	.sl-article td:not(.sl-num) { min-width: 8.5em; }
	.sl-article :is(th, td):first-child { position: sticky; left: 0; z-index: 1; min-width: 9.5em; max-width: 11em; box-shadow: inset -1px 0 0 var(--sl-line); }
	.sl-article thead th:first-child { z-index: 2; }
	.sl-btn--sm { min-height: 44px; }
	.sl-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
	.sl-footer__mail { display: inline-flex; align-items: center; min-height: 44px; }
	.sl-breadcrumb a { padding: 10px 0; }


	/* Long words and figures (URLs, revenue) wrap instead of overflowing. */
	.sl-main :is(h1, h2, h3, p, li, dd, dt) { overflow-wrap: break-word; }
}

/* ---------- Tap-to-open cards (assets/js/sl-fold.js) ----------
   Titles become buttons; the supporting text stays in the HTML but is tucked
   away until opened. Without JavaScript nothing is folded. */
.sl-fold.sl-is-open .sl-fold__part { animation: sl-fade .25s both; }
.sl-fold__toggle {
	display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
	width: 100%; min-height: 44px; padding: 0; margin: 0;
	background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; line-height: inherit;
	text-align: left; text-transform: inherit; cursor: pointer;
}
.sl-fold__icon {
	position: relative; flex: 0 0 28px; width: 28px; height: 28px; margin-top: -2px;
	border: 1px solid currentColor; border-radius: 50%; opacity: .55;
	transition: transform .3s var(--sl-ease-ui), opacity .2s ease, background-color .2s ease;
}
.sl-fold__icon::before,
.sl-fold__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; margin: -.75px 0 0 -5.5px; background: currentColor; }
.sl-fold__icon::after { transform: rotate(90deg); transition: transform .3s var(--sl-ease-ui); }
.sl-fold__toggle:hover .sl-fold__icon,
.sl-fold__toggle:focus-visible .sl-fold__icon { opacity: 1; }
.sl-fold.sl-is-open .sl-fold__icon { background: var(--sl-lime); border-color: var(--sl-lime); color: var(--sl-ink); opacity: 1; }
.sl-fold.sl-is-open .sl-fold__icon::after { transform: rotate(0deg); }

/* ---------- Hero photo shade ----------
   The design shaded the whole hero photo dark. Keep the shade behind the
   text only (left side, plus a light band under the header) so the photo
   itself stays visible. */
.sl-site .sl-hero__shade,
.sl-site .sl-hero__shade--home { background: linear-gradient(90deg, rgba(10, 10, 11, .78) 0%, rgba(10, 10, 11, .58) 40%, rgba(10, 10, 11, 0) 72%); }
.sl-site .sl-hero__copy { text-shadow: 0 1px 14px rgba(10, 10, 11, .5); }
.sl-site .sl-hero__shade::after,
.sl-site .sl-hero__shade--home::after { background: linear-gradient(180deg, rgba(10, 10, 11, .4) 0%, rgba(10, 10, 11, 0) 20%); }

@media (max-width: 768px) {
	/* On phones the text spans the full width, so shade from the bottom up
	   where the copy sits and leave the top of the photo clear. */
	.sl-site .sl-hero__shade,
	.sl-site .sl-hero__shade--home { background: linear-gradient(180deg, rgba(10, 10, 11, .25) 0%, rgba(10, 10, 11, .55) 45%, rgba(10, 10, 11, .78) 100%); }
	.sl-site .sl-hero__shade::after,
	.sl-site .sl-hero__shade--home::after { background: none; }
}

/* ---------- Photo heroes on phones ----------
   Phones get the headline and one button only, sat at the bottom of a
   taller hero, so the photo or video is what people see first. The label,
   the paragraph and the second button stay on desktop and tablet.
   Applies to every hero with a photo or video (not the plain gradient
   heroes on About, Blog, Work, legal and case-study pages). */
@media (max-width: 768px) {
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-hero__inner { display: flex; flex-direction: column; justify-content: flex-end; min-height: min(82svh, 680px); padding-bottom: 32px; }
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-hero__copy > .sl-eyebrow,
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-hero__copy > .sl-lead,
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-btn-row > .sl-btn:not(:first-child) { display: none; }
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-h1 { margin-top: 0; font-size: clamp(30px, 8.6vw, 36px); line-height: 1.04; }
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-btn-row { margin-top: 18px; }
	.sl-site .sl-hero:not(.sl-hero--glow):not(.sl-hero--showcase) .sl-btn-row > .sl-btn { min-height: 44px; padding: 12px 22px; font-size: 15px; }
	/* Less text, so a lighter shade: clear photo on top, dark only behind the copy. */
	.sl-site .sl-hero__shade,
	.sl-site .sl-hero__shade--home { background: linear-gradient(180deg, rgba(10, 10, 11, .2) 0%, rgba(10, 10, 11, 0) 30%, rgba(10, 10, 11, .15) 55%, rgba(10, 10, 11, .8) 100%); }
}

/* ---------- Home "Crafting emails": Column Spread cards (sl-spread.js) ----------
   The script adds a canvas inside the [data-showcase] box that fades in once
   the designs have loaded, then hides the three scrolling columns. */
.sl-site .sl-spread { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.sl-site .sl-spread.sl-is-ready { opacity: 1; }
.sl-site .sl-spread canvas { display: block; width: 100%; height: 100%; }
.sl-site .sl-showcase__cols--spread > .sl-showcase__col,
.sl-site .sl-showcase__cols--spread > .sl-showcase__source { visibility: hidden; }

/* ---------- Hero clip dots ----------
   Theme/browser button styles painted a lime square behind a tapped dot.
   Keep the button itself clear; only the round dot shows state. */
.sl-site .sl-clips__dot,
.sl-site .sl-clips__dot:hover,
.sl-site .sl-clips__dot:focus,
.sl-site .sl-clips__dot:active { background: transparent; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.sl-site .sl-clips__dot:focus { outline: none; }
.sl-site .sl-clips__dot:focus-visible::before { box-shadow: 0 0 0 3px rgba(166, 242, 46, .45); }

/* Home "Crafting emails": the generated heading has no space between the field
   text and the accent word, so it read "CRAFTINGEMAILS". Add the space back. */
.sl-site .sl-showcase__title .sl-accent::before { content: " "; }
