/*
 * The sample site in a browser frame.
 *
 * One markup, two modes:
 *   .jb-sample            designed state, coloured by the preset variables
 *   .jb-sample.is-wire    wireframe state: text becomes grey bars, photos become crossed boxes
 * Both layers sit in .jb-browser__viewport; the design layer is clipped by --wipe (0 to 1) for Day 3.
 *
 * All sizes inside the sample are in cqi (percent of the frame width), so it is sharp at any size.
 * Below 560px frame width the sample switches to its own phone layout.
 */

/* ---------- Browser frame ---------- */

.jb-browser {
	container-type: inline-size;
	position: relative;
	margin: 0;
	background: #fff;
	border: 1px solid rgba(16, 17, 20, 0.14);
	border-radius: var(--jb-radius-l);
	box-shadow: var(--jb-shadow-frame);
	overflow: hidden;
}
.jb-browser__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	height: 40px;
	padding-inline: 14px;
	background: #F1EFEA;
	border-bottom: 1px solid rgba(16, 17, 20, 0.08);
}
.jb-browser__dots { display: flex; gap: 6px; }
.jb-browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(16, 17, 20, 0.16); }
.jb-browser__url {
	flex: 1;
	max-width: 420px;
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 26px;
	padding-inline: 12px;
	border-radius: 999px;
	background: #fff;
	font-family: var(--jb-font-mono);
	font-size: 11.5px;
	color: var(--jb-ink-soft);
	white-space: nowrap;
	overflow: hidden;
}
.jb-browser__status {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #F2A93B;     /* amber until launch */
	flex: none;
}
.jb-browser__status.is-live { background: #1FB25A; }
.jb-browser__tag {
	font-family: var(--jb-font-mono);
	font-size: 10px;
	letter-spacing: var(--jb-tracking-mono);
	text-transform: uppercase;
	color: var(--jb-ink-soft);
	padding: 3px 7px;
	border: 1px solid rgba(16, 17, 20, 0.14);
	border-radius: 4px;
}

.jb-browser__viewport {
	position: relative;
	aspect-ratio: 16 / 10.4;
	overflow: hidden;
	background: #fff;
}
.jb-browser__viewport > .jb-sample { position: absolute; inset: 0; }

/* Design layer revealed by a slanted wipe from the left. --wipe: 0 (none) to 1 (all); --slant: half the lean. */
.jb-browser__viewport {
	--slant: 6%;
	--edge: calc(var(--wipe, 1) * (100% + 2 * var(--slant)) - var(--slant));
}
.jb-browser__viewport > .jb-sample:not(.is-wire) {
	clip-path: polygon(0 0, calc(var(--edge) + var(--slant)) 0, calc(var(--edge) - var(--slant)) 100%, 0 100%);
}
.jb-wipe-edge {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: var(--jb-orange);
	clip-path: polygon(
		calc(var(--edge) + var(--slant) - 1.5px) 0, calc(var(--edge) + var(--slant) + 1.5px) 0,
		calc(var(--edge) - var(--slant) + 1.5px) 100%, calc(var(--edge) - var(--slant) - 1.5px) 100%
	);
}
.jb-wipe-label {
	position: absolute;
	top: 12px;
	left: calc(var(--edge) + var(--slant) - 0.5 * var(--slant));
	padding: 4px 8px;
	border-radius: 4px;
	background: var(--jb-orange);
	color: var(--jb-ink);
	font-family: var(--jb-font-mono);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: var(--jb-tracking-mono);
	white-space: nowrap;
}

/* ---------- Presets ---------- */

.jb-sample {
	--s-bg: #fff;
	--s-fg: #14161C;
	--s-muted: #5A5F6B;
	--s-soft: #F3F4F7;
	--s-brand: #14213D;
	--s-brand-ink: #fff;
	--s-accent: #FFC93C;
	--s-accent-ink: #14213D;
	--s-head: var(--jb-font-display);
	--s-head-stretch: 100%;
	--s-head-weight: 800;
	--s-body: var(--jb-font-text);
	--s-radius: 1.1cqi;
}
.jb-sample[data-preset="trade"] {
	--s-brand: #14213D;      /* navy */
	--s-accent: #FFC93C;     /* van yellow */
	--s-accent-ink: #14213D;
	--s-soft: #F2F4F8;
}

/* ---------- Sample site layout (designed state) ---------- */

.jb-sample {
	background: var(--s-bg);
	color: var(--s-fg);
	font-family: var(--s-body);
	font-size: 1.25cqi;
	line-height: 1.45;
	letter-spacing: 0;
	overflow: hidden;
	text-align: left;
}
.jb-sample * { letter-spacing: inherit; }
.jb-sample img { width: 100%; height: 100%; object-fit: cover; }

.s-head {
	display: flex;
	align-items: center;
	gap: 3cqi;
	padding: 1.8cqi 3.6cqi;
	border-bottom: 1px solid rgba(20, 22, 28, 0.08);
}
.s-logo { display: flex; align-items: center; gap: 0.9cqi; }
.s-logo__icon {
	width: 3cqi;
	height: 3cqi;
	border-radius: 0.7cqi;
	background: var(--s-brand);
	box-shadow: inset 0 -0.7cqi 0 var(--s-accent);
}
.s-logo__name {
	display: grid;
	font-family: var(--s-head);
	font-weight: var(--s-head-weight);
	font-stretch: var(--s-head-stretch);
	font-size: 1.7cqi;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--s-brand);
}
.s-logo__name small {
	font-family: var(--s-body);
	font-weight: 500;
	font-size: 0.9cqi;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--s-muted);
	margin-top: 0.35cqi;
}
.s-nav { display: flex; gap: 2.4cqi; margin-left: auto; font-size: 1.2cqi; font-weight: 500; }
.s-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.6cqi;
	padding: 1cqi 1.7cqi;
	border-radius: var(--s-radius);
	background: var(--s-accent);
	color: var(--s-accent-ink);
	font-weight: 700;
	font-size: 1.2cqi;
	white-space: nowrap;
}
.s-btn--line { background: transparent; color: var(--s-brand); box-shadow: inset 0 0 0 1.5px currentColor; }

.s-hero {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 3.4cqi;
	align-items: center;
	padding: 3.6cqi 3.6cqi 3.2cqi;
}
.s-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.7cqi;
	font-size: 1.05cqi;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--s-brand);
}
.s-eyebrow::before { content: ""; width: 0.8cqi; height: 0.8cqi; border-radius: 50%; background: var(--s-accent); box-shadow: 0 0 0 0.3cqi rgba(255, 201, 60, 0.3); }
.s-title {
	margin-top: 1.4cqi;
	font-family: var(--s-head);
	font-weight: var(--s-head-weight);
	font-stretch: var(--s-head-stretch);
	font-size: 4.6cqi;
	line-height: 0.98;
	letter-spacing: -0.03em;
	color: var(--s-brand);
}
.s-title mark { background: linear-gradient(transparent 62%, var(--s-accent) 62%, var(--s-accent) 92%, transparent 92%); color: inherit; }
.s-lede { margin-top: 1.5cqi; font-size: 1.45cqi; color: var(--s-muted); max-width: 34ch; }
.s-actions { display: flex; flex-wrap: wrap; gap: 1cqi; margin-top: 2.2cqi; }
.s-proof { display: flex; align-items: center; gap: 0.8cqi; margin-top: 2.2cqi; font-size: 1.1cqi; color: var(--s-muted); }
.s-proof b { color: var(--s-fg); }
.s-stars { color: #F2A93B; letter-spacing: 0.1em; }
.s-hero__media {
	position: relative;
	aspect-ratio: 4 / 3.3;
	border-radius: calc(var(--s-radius) * 1.6);
	overflow: hidden;
	background: var(--s-soft);
}
.s-badge {
	position: absolute;
	left: 1.4cqi;
	bottom: 1.4cqi;
	display: grid;
	padding: 1cqi 1.4cqi;
	border-radius: var(--s-radius);
	background: var(--s-brand);
	color: var(--s-brand-ink);
	font-size: 1cqi;
	line-height: 1.3;
}
.s-badge b { font-family: var(--s-head); font-size: 1.9cqi; font-weight: var(--s-head-weight); line-height: 1; }

.s-services {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.8cqi;
	padding: 0 3.6cqi 3cqi;
}
.s-card { display: grid; gap: 0.9cqi; }
.s-card__media { aspect-ratio: 16 / 9; border-radius: var(--s-radius); overflow: hidden; background: var(--s-soft); }
.s-card__title {
	margin: 0;
	font-family: var(--s-head);
	font-weight: var(--s-head-weight);
	font-stretch: var(--s-head-stretch);
	font-size: 1.6cqi;
	line-height: 1.1;
	color: var(--s-brand);
}
.s-card p:not(.s-card__title) { margin: 0; font-size: 1.1cqi; color: var(--s-muted); }

.s-strip {
	display: flex;
	justify-content: space-between;
	gap: 2cqi;
	padding: 1.6cqi 3.6cqi;
	background: var(--s-brand);
	color: var(--s-brand-ink);
	font-size: 1.15cqi;
	font-weight: 600;
}
.s-strip span::before { content: "✓ "; color: var(--s-accent); }

/* ---------- Wireframe mode ---------- */

.jb-sample.is-wire {
	--wf: #E4E4E7;
	--wf-line: #C9CAD0;
	--wf-label: var(--jb-blue);
	background: #FBFBFA;
	color: #9A9BA1;
}
/* Text becomes bars, one per line */
.jb-sample.is-wire :is(.s-title, .s-lede, .s-card__title, .s-card p:not(.s-card__title), .s-nav a, .s-eyebrow, .s-proof, .s-logo__name, .s-badge, .s-strip span) {
	color: transparent !important;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.jb-sample.is-wire :is(.s-title, .s-lede, .s-card__title, .s-card p:not(.s-card__title), .s-proof, .s-nav a, .s-eyebrow, .s-logo__name) > .t {
	background: var(--wf);
	border-radius: 0.3cqi;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.jb-sample.is-wire .s-title > .t { background: #D6D7DC; }
.jb-sample.is-wire .s-title mark { background: none; }
.jb-sample.is-wire .s-eyebrow::before,
.jb-sample.is-wire .s-stars { opacity: 0; }
.jb-sample.is-wire .s-logo__icon { background: var(--wf); box-shadow: none; }
.jb-sample.is-wire .s-logo__name small { color: transparent; }
.jb-sample.is-wire .s-btn { background: transparent; color: transparent; box-shadow: inset 0 0 0 1.5px var(--wf-line); }
.jb-sample.is-wire .s-head { border-bottom-color: var(--wf); }
.jb-sample.is-wire .s-strip { background: var(--wf); }
.jb-sample.is-wire .s-strip span::before { color: transparent; }
.jb-sample.is-wire .s-badge { background: #D6D7DC; }
.jb-sample.is-wire .s-badge b { color: transparent; }

/* Photos become boxes with a cross */
.jb-sample.is-wire :is(.s-hero__media, .s-card__media) {
	background:
		linear-gradient(to top right, transparent calc(50% - 0.5px), var(--wf-line) 50%, transparent calc(50% + 0.5px)),
		linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--wf-line) 50%, transparent calc(50% + 0.5px)),
		#EFEFF1;
	box-shadow: inset 0 0 0 1.5px var(--wf-line);
}
.jb-sample.is-wire img { opacity: 0; }

/* Blueprint labels on the wireframe */
.jb-sample.is-wire [data-wf] { position: relative; }
.jb-sample.is-wire [data-wf]::after {
	content: attr(data-wf);
	position: absolute;
	top: 0;
	left: 0;
	transform: translateY(-115%);
	font-family: var(--jb-font-mono);
	font-size: max(0.8cqi, 8px);
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1;
	color: var(--wf-label);
	white-space: nowrap;
}
.jb-sample.is-wire :is(.s-hero__media, .s-card__media)[data-wf]::after {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 0.4cqi 0.7cqi;
	background: #FBFBFA;
	border: 1px solid var(--wf-label);
	border-radius: 0.3cqi;
}

/* ---------- Sample site on a narrow frame (phone layout) ---------- */

@container (max-width: 560px) {
	.jb-browser__viewport { aspect-ratio: 9 / 13.5; }
	.jb-sample { font-size: 3.4cqi; }
	.s-head { padding: 3.8cqi 5cqi; gap: 3cqi; }
	.s-logo__icon { width: 7cqi; height: 7cqi; border-radius: 1.6cqi; box-shadow: inset 0 -1.6cqi 0 var(--s-accent); }
	.s-logo__name { font-size: 4.4cqi; }
	.s-logo__name small { font-size: 2.3cqi; }
	.s-nav { display: none; }
	.s-head .s-btn { margin-left: auto; }
	.s-btn { font-size: 3.4cqi; padding: 2.6cqi 4cqi; border-radius: 2.4cqi; }
	.s-hero { grid-template-columns: 1fr; gap: 5cqi; padding: 6cqi 5cqi 5cqi; }
	.s-hero__media { order: -1; aspect-ratio: 16 / 10; border-radius: 3cqi; }
	.s-eyebrow { font-size: 2.7cqi; gap: 1.6cqi; }
	.s-eyebrow::before { width: 2cqi; height: 2cqi; }
	.s-title { font-size: 10.5cqi; margin-top: 3cqi; }
	.s-lede { font-size: 3.7cqi; margin-top: 3cqi; }
	.s-actions { gap: 2.4cqi; margin-top: 4.5cqi; }
	.s-proof { font-size: 3cqi; margin-top: 4cqi; gap: 2cqi; }
	.s-badge { left: 3cqi; bottom: 3cqi; padding: 2.2cqi 3cqi; font-size: 2.6cqi; border-radius: 2cqi; }
	.s-badge b { font-size: 4.6cqi; }
	.s-services, .s-strip { display: none; }
	.jb-sample.is-wire [data-wf]::after { font-size: 2.2cqi; }
	.jb-browser__viewport { --slant: 12%; }
}
