/* R-Build – site-wide pieces: layout primitives, buttons, forms, enquiry dialog, floating WhatsApp. */

:root {
	--rb-navy: #0B2B3F;
	--rb-navy-2: #24435F;
	--rb-hover: #35415B;
	--rb-heading: #0F131F;
	--rb-body: #333C52;
	--rb-faded: #727F9F;
	--rb-alt: #F2F4F7;
	--rb-line: #E3E7F0;
	--rb-input: #CCCCCC;
	--rb-wa: #25D366;
	--rb-error: #B3261E;
	--rb-radius: 4.8px;
	--rb-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Our pages start with a navy band. When Impreza's header is fixed or transparent it overlaps the page
   (Impreza only pads its own .l-section blocks), so each band adds the header height to its top padding. */
.header_hor .l-header.pos_fixed ~ .l-main,
.header_hor .l-header.pos_static.bg_transparent ~ .l-main { --rb-head: var(--header-height, 0px); }

.rb-wrap { max-width: 1188px; margin: 0 auto; padding: 0 24px; }
.rb-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14.4px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.rb-crumbs a { color: #fff; }
.rb-crumbs a:hover { text-decoration: underline; }
.rb-arrow-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 16px; font-weight: 700; color: var(--rb-navy-2); white-space: nowrap; }
.rb-arrow-link svg { transition: transform .25s ease; }
.rb-arrow-link:hover svg { transform: translateX(3px); }

.rb-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.rb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px;
	border: 1px solid transparent; border-radius: var(--rb-radius);
	font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2;
	text-decoration: none !important; cursor: pointer;
	transition: background .3s ease, color .3s ease, border-color .3s ease;
	white-space: nowrap;
}
.rb-btn svg { flex-shrink: 0; }
.rb-btn--primary { background: var(--rb-navy); color: #fff !important; }
.rb-btn--primary:hover, .rb-btn--primary:focus-visible { background: var(--rb-hover); color: #fff !important; }
.rb-btn--outline { background: #fff; color: var(--rb-navy) !important; border-color: var(--rb-navy); }
.rb-btn--outline:hover { background: var(--rb-alt); }
.rb-btn--ghost { background: #fff; color: var(--rb-heading) !important; border-color: var(--rb-input); }
.rb-btn--ghost:hover { background: var(--rb-alt); }
.rb-btn--light { background: #fff; color: var(--rb-navy) !important; }
.rb-btn--light:hover { background: var(--rb-alt); }
.rb-btn--outline-light { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.65); }
.rb-btn--outline-light:hover { background: rgba(255,255,255,.12); }
.rb-btn--wa { background: var(--rb-wa); color: var(--rb-heading) !important; }
.rb-btn--wa:hover { background: #1fbd59; }
.rb-btn--block { display: flex; width: 100%; }

/* Impreza styles [type=submit] buttons with its own colours and sizes; keep ours. */
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-btn.rb-btn--primary[type="submit"] {
	min-height: 48px; padding: 0 22px; margin: 0;
	border: 1px solid transparent; border-radius: var(--rb-radius);
	background: var(--rb-navy); color: #fff;
	font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.2;
	letter-spacing: 0; text-transform: none; box-shadow: none;
}
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-btn.rb-btn--primary[type="submit"]:hover,
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-btn.rb-btn--primary[type="submit"]:focus-visible { background: var(--rb-hover); color: #fff; }
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-btn[type="submit"]::before,
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-btn[type="submit"]::after { content: none; }
.rb-btn[disabled] { opacity: .6; cursor: wait; }

.rb-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; flex-shrink: 0; padding: 0;
	border: 0; border-radius: var(--rb-radius); background: transparent; color: inherit; cursor: pointer;
}
.rb-icon-btn--wa { background: var(--rb-wa); color: var(--rb-heading) !important; }

.rb-link-btn {
	padding: 0; border: 0; background: none; cursor: pointer;
	font: inherit; font-weight: 700; color: var(--rb-navy-2);
	min-height: 40px;
}
.rb-link-btn:hover { color: var(--rb-hover); }

:where(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) :focus-visible { outline: 2px solid var(--rb-navy); outline-offset: 3px; }
/* Impreza hyphenates paragraphs; product names and copy read better without it. */
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) :is(p, h1, h2, h3, h4, li, dd, dt, a, span, label) { -webkit-hyphens: manual; hyphens: manual; }

/* ---------- Lists styled as layouts, and the segment tiles (Solutions and Products pages) ---------- */
/* One class only, so the component rules can set their own spacing. */
.rb-plain { list-style: none; margin: 0; padding: 0; }
.rb-plain > li { margin: 0; }
.rb-tiles { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.rb-tile { display: flex; flex-direction: column; height: 100%; color: var(--rb-heading); text-decoration: none; }
.rb-tile:hover { color: var(--rb-heading); }
.rb-tile:focus-visible { outline: 2px solid var(--rb-navy); outline-offset: 4px; }
.rb-tile__media { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--rb-alt); }
.rb-tile__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.rb-tile:hover .rb-tile__media img { transform: scale(1.05); }
.rb-tile__name { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.rb-tile__name svg { flex-shrink: 0; color: var(--rb-navy-2); transition: transform .25s ease; }
.rb-tile:hover .rb-tile__name svg { transform: translateX(3px); }
@media (max-width: 900px) {
	.rb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
}

/* ---------- Brand logos in a row (Home, About, Products) ----------
   Each logo's width comes from its shape (rb_brand_logo_width), so they look the same size; the gaps between
   them are equal. A gentle zoom on hover, as the client asked. */
.rb-logo-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; }
.rb-logo-row > li { display: flex; }
.rb-logo-row__item { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rb-logo-row img { display: block; width: var(--w); max-width: 100%; height: auto; transition: transform .3s ease; }
a.rb-logo-row__item:hover img { transform: scale(1.1); }
a.rb-logo-row__item:focus-visible { outline: 2px solid var(--rb-navy); outline-offset: 6px; }
@media (max-width: 1100px) {
	.rb-logo-row { justify-content: center; gap: 28px 48px; }
}
@media (max-width: 600px) {
	.rb-logo-row { gap: 24px 32px; }
	.rb-logo-row img { width: calc(var(--w) * .8); }
	.rb-tiles { margin-top: 20px; gap: 24px 12px; }
	.rb-tile__name { margin-top: 10px; font-size: 16px; }
	.rb-tile__name svg { display: none; }
}

/* ---------- Enquiry dialog ---------- */
.rb-dialog {
	width: min(760px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0; border: 0; border-radius: 0;
	background: #fff; color: var(--rb-body);
	font-family: 'Assistant', sans-serif;
	box-shadow: 0 24px 64px rgba(11, 43, 63, .35);
}
.rb-dialog::backdrop { background: rgba(11, 43, 63, .55); }
.rb-dialog[open] { animation: rb-dialog-in .35s var(--rb-ease); }
@keyframes rb-dialog-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rb-dialog__panel { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.rb-dialog__head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 18px 20px 18px 28px; background: var(--rb-navy); color: #fff;
}
.rb-dialog__head h2 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; color: #fff; }
.rb-dialog__head .rb-icon-btn { color: #fff; }
.rb-dialog__body, .rb-dialog__done { overflow-y: auto; padding: 24px 28px 28px; }
.rb-dialog__products { padding: 16px 18px; background: var(--rb-alt); }
.rb-dialog__products-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rb-dialog__products-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--rb-heading); }
.rb-dialog__products-head a { font-size: 15px; font-weight: 700; color: var(--rb-navy-2); text-decoration: none; }
.rb-dialog__items { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rb-dialog__items li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: #fff; }
.rb-dialog__item-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; color: var(--rb-heading); }
.rb-dialog__item-name small { display: block; font-weight: 400; color: var(--rb-body); }
.rb-dialog__items input {
	width: 130px; height: 40px; padding: 0 10px;
	border: 1px solid var(--rb-input); border-radius: var(--rb-radius);
	font: inherit; font-size: 15px; color: var(--rb-heading); background: #fff;
}
.rb-dialog__items .rb-icon-btn { width: 40px; height: 40px; color: var(--rb-navy-2); }
.rb-dialog__noitems { margin: 8px 0 0; font-size: 15px; }

.rb-form { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.rb-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rb-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.rb-field label, .rb-field legend { font-size: 15px; font-weight: 700; color: var(--rb-heading); padding: 0; }
.rb-req { color: var(--rb-navy-2); }
.rb-opt { font-weight: 400; color: var(--rb-body); }
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field input,
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field textarea,
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) input.rb-input {
	width: 100%; min-height: 50px; padding: 12px 14px; margin: 0;
	border: 1px solid var(--rb-input); border-radius: var(--rb-radius);
	box-shadow: inset 0 1px 0 rgba(0, 0, 0, .08);
	font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--rb-heading); background: #fff;
}
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field textarea { resize: vertical; min-height: 96px; }
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field input:focus, :is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field textarea:focus, :is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) input.rb-input:focus { outline: 2px solid var(--rb-navy); outline-offset: 0; border-color: var(--rb-navy); }
:is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field.is-error input, :is(.rb-cat, .rb-pdp, .rb-page, .rb-dialog) .rb-field.is-error textarea { border-color: var(--rb-error); }
.rb-field__error { display: none; margin: 0; font-size: 14px; font-weight: 600; color: var(--rb-error); }
.rb-field.is-error .rb-field__error { display: block; }
.rb-form__alert { padding: 12px 14px; background: #FBEFEE; box-shadow: inset 4px 0 0 var(--rb-error); font-weight: 700; color: var(--rb-heading); }
.rb-seg { display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rb-navy); border-radius: var(--rb-radius); overflow: hidden; }
.rb-seg label { position: relative; margin: 0; cursor: pointer; }
.rb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rb-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 700; color: var(--rb-navy); transition: background .3s, color .3s; }
.rb-seg input:checked + span { background: var(--rb-navy); color: #fff; }
.rb-seg input:focus-visible + span { outline: 2px solid var(--rb-navy); outline-offset: -4px; }
.rb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rb-form__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rb-form__note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--rb-faded); }
.rb-form__note a { color: var(--rb-navy-2); font-weight: 700; }

.rb-dialog__done { text-align: left; }
.rb-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--rb-navy); color: #fff; }
.rb-dialog__done h3 { margin: 18px 0 0; font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--rb-heading); }
.rb-dialog__done p { margin: 10px 0 22px; font-size: 17px; line-height: 1.6; }

/* ---------- Page hero: navy, photo on a 30° wedge (About, Contact and our other page designs) ---------- */
.rb-ph { position: relative; overflow: hidden; background: var(--rb-navy); color: #fff; padding: calc(var(--rb-head, 0px) + 28px) 0 152px; font-family: 'Assistant', sans-serif; }
.rb-ph h1, .rb-ph p { font-family: inherit; letter-spacing: 0; text-transform: none; padding: 0; }
.rb-ph__photo {
	position: absolute; top: 0; right: 0; bottom: 0; width: 46%;
	clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
	background-position: center; background-size: cover; background-repeat: no-repeat;
}
.rb-ph__photo::after { content: ""; position: absolute; inset: 0; background: rgba(36, 67, 95, .78); }
.rb-ph__inner { position: relative; }
.rb-ph__text { max-width: 640px; padding-top: 64px; }
.rb-ph__eyebrow { margin: 0 0 12px; font-size: 19.2px; line-height: 1.3; color: rgba(255, 255, 255, .86); }
.rb-ph__title { margin: 0; font-size: clamp(32px, calc(22px + 1.6vw), 44.8px); font-weight: 900; line-height: 1.2; color: #fff; }
.rb-ph__intro { margin: 20px 0 0; font-size: 17.6px; line-height: 29px; color: rgba(255, 255, 255, .9); }
.rb-ph__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Band: the same look, shorter, at the top of every page that had Impreza's centred title bar. */
.rb-ph.rb-ph--band { padding-bottom: 64px; }
.rb-ph--band .rb-ph__photo { width: 42%; }
.rb-ph--band .rb-ph__text { max-width: 620px; padding-top: 40px; }
.rb-ph--band .rb-ph__title { font-size: clamp(30px, calc(22px + 1.3vw), 40.72px); font-weight: 700; }
.rb-ph--band .rb-ph__eyebrow + .rb-ph__title { font-weight: 900; }
.rb-ph--band .rb-ph__intro { margin-top: 14px; }

@media (max-width: 900px) {
	.rb-ph { padding-bottom: 128px; }
	.rb-ph__photo { width: 40%; clip-path: polygon(34% 0, 100% 0, 100% 100%, 0 100%); }
	.rb-ph__text { max-width: 480px; padding-top: 40px; }
	.rb-ph__title { font-size: 38px; line-height: 1.18; }
	.rb-ph__intro { font-size: 17px; line-height: 28px; }
	.rb-ph.rb-ph--band { padding-bottom: 48px; }
	.rb-ph--band .rb-ph__text { max-width: 54%; padding-top: 28px; }
	.rb-ph--band .rb-ph__title { font-size: 34px; }
}

@media (max-width: 600px) {
	/* Photo strip on top (breadcrumbs sit on it), text below. */
	.rb-ph { padding-bottom: 32px; padding-top: calc(var(--rb-head, 0px) + 16px); }
	.rb-ph__photo { left: 0; width: auto; bottom: auto; height: calc(var(--rb-head, 0px) + 210px); clip-path: polygon(0 0, 100% 0, 100% 74%, 0 100%); }
	.rb-ph__text { max-width: none; padding-top: 170px; }
	.rb-ph__eyebrow { margin-bottom: 8px; font-size: 16px; }
	.rb-ph__title { font-size: 32px; line-height: 1.15; }
	.rb-ph__intro { margin-top: 14px; font-size: 16px; line-height: 26px; }
	.rb-ph__actions { margin-top: 22px; flex-direction: column; gap: 10px; }
	.rb-ph__actions .rb-btn { width: 100%; }
	.rb-ph.rb-ph--band { padding-bottom: 28px; }
	.rb-ph--band .rb-ph__photo { width: auto; height: calc(var(--rb-head, 0px) + 140px); }
	.rb-ph--band .rb-ph__text { max-width: none; padding-top: 104px; }
	.rb-ph--band .rb-ph__title { font-size: 30px; }
}

/* ---------- Floating WhatsApp ---------- */
.rb-wa-float {
	position: fixed; right: 24px; bottom: 24px; z-index: 9990;
	display: flex; align-items: center; justify-content: center;
	width: 60px; height: 60px; border-radius: 50%;
	background: var(--rb-wa); color: #fff !important;
	box-shadow: 0 8px 24px rgba(11, 43, 63, .28);
	transition: transform .3s var(--rb-ease);
}
.rb-wa-float:hover { transform: translateY(-3px); }
@media (max-width: 1100px) {
	body.rb-has-bar .rb-wa-float { bottom: 96px; }
}

@media (max-width: 600px) {
	.rb-wrap { padding: 0 20px; }
	.rb-form__row { grid-template-columns: minmax(0, 1fr); }
	.rb-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100%; margin: 0; }
	.rb-dialog__panel { max-height: 100vh; height: 100%; }
	.rb-dialog__body, .rb-dialog__done { padding: 20px; }
	.rb-dialog__items input { width: 100px; }
	.rb-seg { display: grid; width: 100%; }
	.rb-seg span { padding: 0 8px; }
	.rb-form__actions .rb-btn { width: 100%; }
	.rb-wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
	body.rb-has-bar .rb-wa-float { bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
	.rb-dialog[open], .rb-wa-float, .rb-btn, .rb-tile img, .rb-tile svg, .rb-logo-row img { animation: none !important; transition: none !important; }
}
