/* ===========================================================================
   Book a demo page, design canvas "Book a demo page" (2026-10-02)
   ===========================================================================
   Loaded only on pages whose content uses the `cq-demo-` sections (see
   inc/page-demo.php), so nothing here reaches other pages. Values follow
   the canvas and the Certain QMS Web Design System it was built with:
   eyebrow, H1 and lead, then the Calendly calendar on the left (event details hidden: the demo duration is never stated) and ""Before your demo" / "Før demoen" tips on the right (wrapping to one
   column below 1024px).

   Spacing comes from flex/grid `gap`, so block margins inside these sections
   are reset, as on the contact and consulting pages. */

.cq-main {
	--cq-demo-gutter: clamp(20px, 5vw, 64px);
	--cq-demo-muted: #3f4947;
}

.wp-block-post-content > .cq-demo-s {
	margin-block: 0 !important;
}

.cq-main .cq-demo-s :where(h1, h2, h3, p, .wp-block-group) {
	margin: 0 !important;
}

.cq-main .cq-demo-s {
	background-color: #ffffff;
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.cq-main .cq-demo-wrap {
	box-sizing: border-box;
	margin-inline: auto !important;
	max-width: 1200px;
	padding-inline: var(--cq-demo-gutter);
}

/* --- Intro ----------------------------------------------------------------- */

.cq-main .cq-demo-hero {
	padding-block: 72px 48px;
}

.cq-main .cq-demo-head {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cq-main .cq-demo-eyebrow {
	color: var(--cq-navy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.cq-main .cq-demo-title {
	color: var(--cq-ink);
	font-size: clamp(34px, 4.4vw, 56px);
	font-weight: 500;
	letter-spacing: -0.022em;
	line-height: 1.08;
	max-width: 760px;
}

.cq-main .cq-demo-lead {
	color: var(--cq-demo-muted);
	font-size: 20px;
	line-height: 1.6;
	max-width: 68ch;
}

/* --- Calendar + tips ------------------------------------------------------- */

.cq-main .cq-demo-main {
	padding-block: 16px 96px;
}

.cq-main .cq-demo-grid {
	align-items: start;
	display: grid;
	gap: 48px;
	grid-template-columns: minmax(0, 1fr);
}

/* No card around the calendar: Calendly sits straight on the white band.
   Kept under 650px wide, where Calendly switches to its bordered, shadowed
   panel with a deep top margin, so the plain layout is used at every width. */
.cq-main .cq-demo-card {
	max-width: 640px;
	scroll-margin-top: 104px;
}

.cq-main .cq-demo-card .calendly-inline-widget,
.cq-main .cq-demo-card .calendly-inline-widget iframe {
	height: 720px !important;
	min-width: 0 !important;
}

.cq-main .cq-demo-card .cq-consent-gate {
	background-color: transparent;
	border: 0;
	max-width: none;
}

.cq-main .cq-demo-aside {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 8px;
}

.cq-main .cq-demo-aside__title {
	color: var(--cq-ink);
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 500;
	letter-spacing: -0.01em;
	line-height: 1.25;
}

.cq-main .cq-demo-tip {
	align-items: flex-start;
	display: flex;
	gap: 16px;
}

.cq-main .cq-demo-tip__icon {
	color: var(--cq-blue);
	display: flex;
	flex-shrink: 0;
	padding-top: 2px;
}

.cq-main .cq-demo-tip__icon::before {
	background-color: currentColor;
	content: "";
	height: 24px;
	-webkit-mask: var(--cq-icon) center / contain no-repeat;
	mask: var(--cq-icon) center / contain no-repeat;
	width: 24px;
}

.cq-main .cq-demo-tip__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cq-main .cq-demo-tip__title,
.cq-main .cq-demo-help__title {
	color: var(--cq-ink);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
}

.cq-main .cq-demo-tip__body,
.cq-main .cq-demo-help__body {
	color: var(--cq-demo-muted);
	font-size: 16px;
	line-height: 1.6;
}

.cq-main .cq-demo-help {
	border-top: 1px solid var(--cq-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 24px;
}

/* "Kontakt oss" is a theme outline button (cq-btn-outline); only spacing here. */
.cq-main .cq-demo-help .wp-block-buttons {
	margin-top: 8px !important;
}

@media (min-width: 1024px) {
	.cq-main .cq-demo-grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	}

	/* Calendly draws its date grid at a fixed size, so a wider frame only
	   adds white space (and past 650px brings back its bordered panel).
	   Zoom the whole embed instead: 640px shows as Calendly's plain ~533px
	   layout at 120%, crisp because zoom re-renders rather than scaling. */
	.cq-main .cq-demo-card .calendly-inline-widget {
		zoom: 1.2;
	}

	/* Calendly pads its own frame, so its "Select a Day" heading starts
	   about 48px down at this zoom. Pull it up level with "Før demoen". */
	.cq-main .cq-demo-card {
		margin-top: -24px !important;
	}
}

@media (max-width: 599.98px) {
	.cq-main .cq-demo-hero {
		padding-block: 48px 32px;
	}

	.cq-main .cq-demo-head {
		gap: 12px;
	}

	.cq-main .cq-demo-lead {
		font-size: 18px;
	}

	.cq-main .cq-demo-main {
		padding-block: 0 64px;
	}

	.cq-main .cq-demo-grid {
		gap: 40px;
	}

	/* Calendly stacks the time slots under the calendar at this width. */
	.cq-main .cq-demo-card .calendly-inline-widget,
	.cq-main .cq-demo-card .calendly-inline-widget iframe {
		height: 900px !important;
	}
}

/* --- Icons ----------------------------------------------------------------- */
/* Lucide-style, 24px, 1.5px stroke, as in the canvas. */

.cq-demo-icon--clipboard {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E");
}

.cq-demo-icon--users {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9'/%3E%3Cpath d='M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E");
}

.cq-demo-icon--clock {
	--cq-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}
