/* Components added for the DEXIN home page and the site-wide inquiry form.
   Uses the tokens in style.css (Carbon rules: square corners, 1px lines, no shadows). */

/* ---------------------------------------------------------------- brand (DEXIN logo red) */
:root {
	--brand:       #c8102e;
	--brand-hover: #a80d26;
	--brand-press: #7d0a1c;
	--brand-dark:  #a80d26;
}
.rp-cta p { color: rgba(255, 255, 255, 0.85); }

/* ---------------------------------------------------------------- shared */
.rp-home { overflow-x: clip; }
.rp-home a:not(.rp-btn):hover { text-decoration: underline; }
.rp-img { display: block; width: 100%; height: auto; }
.rp-img-missing { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--surface-1); border: 1px dashed var(--surface-2); color: var(--ink-subtle); font-size: 12px; text-align: center; padding: var(--s4); }
.rp-media { background: var(--surface-1); overflow: hidden; }
.rp-media img { width: 100%; height: 100%; object-fit: cover; }
.rp-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: center; }
.rp-section-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s6); max-width: none; }
.rp-section-head--row > div { max-width: 760px; }
.rp-section-head h2 { margin-bottom: var(--s3); }
.rp-section-head p:last-child { margin-bottom: 0; }
.rp-num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- hero */
.rp-hero { padding: var(--s8) 0 0; border-bottom: 1px solid var(--line); }
.rp-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s7); align-items: center; }
.rp-hero h1 { margin-bottom: var(--s5); }
.rp-hero .rp-lead { margin-bottom: var(--s6); max-width: 560px; }
.rp-hero__media { aspect-ratio: 3 / 2; }
.rp-hero .rp-keyspecs { margin-top: var(--s8); border-left: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-hero .rp-keyspec { padding: var(--s5) var(--s5) var(--s5) 0; border-right: 0; border-bottom: 0; }
.rp-hero .rp-keyspec + .rp-keyspec { padding-left: var(--s5); border-left: 1px solid var(--line); }
.rp-hero .rp-keyspec__value { font-size: clamp(32px, 3.6vw, 48px); color: var(--brand); }
.rp-hero .rp-keyspec__label { font-size: 14px; letter-spacing: var(--track); }

/* ---------------------------------------------------------------- stats band */
.rp-stats--band { border-top: 0; }
.rp-stats--band .rp-stat { padding: 0 var(--s5) 0 0; }
.rp-stats--band .rp-stat + .rp-stat { padding-left: var(--s5); border-left: 1px solid var(--surface-2); }

/* ---------------------------------------------------------------- machines */
.rp-machines { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s5); }
.rp-machine { border: 1px solid var(--line); background: var(--canvas); display: flex; flex-direction: column; }
.rp-machine__pair { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.rp-machine__item { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.rp-machine__item + .rp-machine__item { border-left: 1px solid var(--line); }
.rp-machine__item .rp-media { aspect-ratio: 4 / 3; margin: calc(var(--s5) * -1) calc(var(--s5) * -1) var(--s2); }
.rp-machine__item h4 { margin: 0; }
.rp-machine__spec { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s4); font-size: 14px; margin: 0; }
.rp-machine__spec dt { color: var(--ink-muted); }
.rp-machine__spec dd { margin: 0; }
.rp-machine__foot { padding: var(--s5); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s4); margin-top: auto; }
.rp-machine__foot h3 { font-size: 20px; margin: 0; }
.rp-machine--small { padding: var(--s5); gap: var(--s3); background: var(--surface-1); border-color: var(--surface-1); }
.rp-machine--small h3 { font-size: 20px; margin: 0; }
.rp-machine--small p { color: var(--ink-muted); margin: 0; }
.rp-machine--small .rp-card__more { margin-top: auto; }

.rp-lines { margin-top: var(--s7); }
.rp-lines__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.rp-lines__head h3 { font-size: 20px; margin: 0; }
.rp-lines__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.rp-line { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5) var(--s5) var(--s5) 0; color: var(--ink); }
.rp-line + .rp-line { padding-left: var(--s5); border-left: 1px solid var(--line); }
.rp-line:hover { background: var(--surface-1); text-decoration: none !important; }
.rp-line__no { font-size: 14px; color: var(--brand); }
.rp-line h4 { font-size: 18px; font-weight: 600; margin: 0; }
.rp-line p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.rp-line .rp-card__more { margin-top: auto; padding-top: var(--s3); }

/* ---------------------------------------------------------------- model finder */
.rp-models .rp-table td, .rp-models .rp-table th { white-space: nowrap; }
.rp-models .rp-table tbody.rp-group th[colspan] { background: var(--surface-1); color: var(--ink); font-weight: 600; }
.rp-models .rp-table td.rp-out { font-size: 18px; font-weight: 300; }
.rp-models .rp-table td.rp-out strong { font-weight: 600; }
.rp-note { font-size: 12px; letter-spacing: 0.32px; color: var(--ink-muted); margin-top: var(--s3); }

/* ---------------------------------------------------------------- features */
.rp-features { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); align-items: start; }
.rp-features__media { aspect-ratio: 4 / 5; position: sticky; top: 96px; }
.rp-features__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); counter-reset: feat; }
.rp-feature { padding: var(--s5) var(--s5) var(--s6) 0; border-bottom: 1px solid var(--line); counter-increment: feat; }
.rp-feature:nth-child(even) { padding-left: var(--s5); padding-right: 0; border-left: 1px solid var(--line); }
.rp-feature::before { content: counter(feat, decimal-leading-zero); display: block; font-size: 14px; color: var(--brand); margin-bottom: var(--s3); }
.rp-feature h4 { font-size: 18px; font-weight: 600; margin-bottom: var(--s2); }
.rp-feature p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.rp-feature b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- applications */
.rp-apps__media { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.rp-apps__media figure { margin: 0; }
.rp-apps__media .rp-media { aspect-ratio: 3 / 2; }
.rp-apps__media figcaption { font-size: 12px; color: var(--ink-muted); padding-top: var(--s2); }
.rp-apps__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rp-apps__list li { display: grid; grid-template-columns: 200px 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rp-apps__list strong { font-weight: 600; font-size: 16px; }
.rp-apps__list span { color: var(--ink-muted); }

/* ---------------------------------------------------------------- stories */
.rp-story { border: 1px solid var(--line); background: var(--canvas); display: flex; flex-direction: column; }
.rp-story__body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.rp-story__body h3 { font-size: 20px; margin: 0; }
.rp-story__body p { font-size: 14px; color: var(--ink-muted); margin: 0; }
.rp-story__results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: auto; }
.rp-story__results div { padding: var(--s4) var(--s3) var(--s4) var(--s5); }
.rp-story__results div + div { border-left: 1px solid var(--line); }
.rp-story__results b { display: block; font-size: 28px; font-weight: 300; line-height: 1.2; color: var(--brand); }
.rp-story__results span { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.32px; }
.rp-story .rp-tag { align-self: flex-start; }

/* ---------------------------------------------------------------- factory */
.rp-factory { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s5); }
.rp-factory__main { aspect-ratio: 16 / 10; }
.rp-factory__side { display: grid; grid-template-rows: auto 1fr; gap: var(--s5); }
.rp-factory__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.rp-factory__thumbs figure { margin: 0; }
.rp-factory__thumbs .rp-media { aspect-ratio: 1 / 1; background: #fff; border: 1px solid var(--line); }
.rp-factory__thumbs .rp-media img { object-fit: contain; }
.rp-factory__thumbs figcaption { font-size: 12px; color: var(--ink-muted); padding-top: var(--s2); }
.rp-checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rp-checks li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-muted); }
.rp-checks strong { display: block; color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: var(--s1); }

/* ---------------------------------------------------------------- FAQ layout */
.rp-faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s7); }
.rp-faq summary h3 { display: inline; font-size: 16px; font-weight: 600; margin: 0; }

/* ---------------------------------------------------------------- inquiry card (site-wide) */
.rp-inq { padding: var(--section) 0; background: var(--surface-1); }
.rp-inq__card { background: var(--canvas); border-top: 4px solid var(--brand); }
.rp-inq__head { display: flex; justify-content: space-between; gap: var(--s6); align-items: flex-end; padding: var(--s6) var(--s6) var(--s5); border-bottom: 1px solid var(--line); }
.rp-inq__head h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: var(--s3); }
.rp-inq__intro { color: var(--ink-muted); margin: 0; max-width: 680px; }
.rp-inq__direct { flex: 0 0 260px; border-left: 1px solid var(--line); padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.rp-inq__direct span { font-size: 12px; letter-spacing: 0.32px; color: var(--ink-muted); }
.rp-inq__wa { font-size: 18px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.rp-inq__wa::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--whatsapp); margin-right: var(--s2); vertical-align: 1px; }
.rp-inq__mail { font-size: 14px; }
.rp-inq__body { padding: var(--s5) var(--s6) var(--s6); }
.rp-inq__title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s4); }
.rp-inq__title h3 { font-size: 20px; margin: 0; }
.rp-inq__title span { font-size: 12px; color: var(--ink-muted); }
.rp-inq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); }
.rp-inq__wide { grid-column: 1 / -1; }
.rp-inq__field { min-width: 0; }
.rp-inq .wpcf7 label, .rp-inq__field label { display: block; font-size: 14px; letter-spacing: var(--track); color: var(--ink); font-weight: 600; margin-bottom: var(--s2); }
.rp-req { color: var(--brand); margin-left: 2px; }
.rp-opt { font-size: 12px; font-weight: 400; color: var(--ink-subtle); margin-left: var(--s1); }
.rp-inq .wpcf7-form-control-wrap { display: block; }
.rp-inq .wpcf7 :is(input[type=text], input[type=email], input[type=tel], select, textarea) {
	display: block; width: 100%; max-width: 100%; min-height: 48px; margin: 0;
	padding: 12px 16px; border: 0; border-bottom: 1px solid #8d8d8d; border-radius: 0;
	background: var(--surface-1); color: var(--ink); font: 400 16px/1.4 var(--font); box-shadow: none;
}
.rp-inq .wpcf7 textarea { min-height: 120px; resize: vertical; }
.rp-inq .wpcf7 :is(input, select, textarea):focus { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--canvas); }
.rp-inq .wpcf7 ::placeholder { color: var(--ink-subtle); opacity: 1; }
.rp-inq__form p, .rp-inq__field p { margin: 0; }
.rp-inq__consent { margin: var(--s5) 0 var(--s4); font-size: 14px; color: var(--ink-muted); }
.rp-inq__consent .wpcf7-list-item { margin: 0; }
.rp-inq__consent label { display: flex !important; gap: var(--s3); align-items: flex-start; font-weight: 400 !important; color: var(--ink-muted) !important; margin: 0 !important; }
.rp-inq__consent input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); margin: 2px 0 0; }
.rp-inq .rp-inq__submit, .rp-inq .wpcf7-submit {
	width: 100%; min-height: 56px; border: 0; border-radius: 0; cursor: pointer;
	background: var(--brand); color: #fff; font: 400 16px/1 var(--font); letter-spacing: var(--track);
	text-align: left; padding: 0 var(--s5);
}
.rp-inq .rp-inq__submit:hover { background: var(--brand-hover); }
.rp-inq .wpcf7-spinner { display: block; margin: var(--s2) 0 0; }
.rp-inq .wpcf7-not-valid-tip { font-size: 12px; color: var(--error); margin-top: var(--s1); }
.rp-inq .wpcf7-response-output { margin: var(--s4) 0 0 !important; padding: var(--s3) var(--s4) !important; border: 0 !important; border-left: 3px solid var(--ink) !important; background: var(--surface-1); font-size: 14px; }
.rp-inq .wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--success) !important; }
.rp-inq .wpcf7 form.invalid .wpcf7-response-output, .rp-inq .wpcf7 form.failed .wpcf7-response-output { border-left-color: var(--error) !important; }

/* ---------------------------------------------------------------- footer additions */
.rp-footer__logo { height: 48px; width: auto; margin-bottom: var(--s4); filter: brightness(0) invert(1); }
.rp-footer p { color: var(--inverse-muted); max-width: 380px; }
.site-footer { display: none; } /* Astra's own footer bar is replaced by .rp-footer */

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1024px) {
	.rp-hero__grid, .rp-split, .rp-features, .rp-factory, .rp-faq-wrap { grid-template-columns: 1fr; gap: var(--s6); }
	.rp-machines { grid-template-columns: 1fr; }
	.rp-lines__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rp-line:nth-child(3) { padding-left: 0; border-left: 0; }
	.rp-line:nth-child(n+3) { border-top: 1px solid var(--line); }
	.rp-features__media { position: static; aspect-ratio: 16 / 9; }
	.rp-stats--band .rp-stat:nth-child(3) { padding-left: 0; border-left: 0; }
	.rp-stats--band { row-gap: var(--s5); }
}
@media (max-width: 760px) {
	.rp-hero { padding-top: var(--s6); }
	.rp-hero .rp-keyspecs { grid-template-columns: 1fr; margin-top: var(--s6); }
	.rp-hero .rp-keyspec + .rp-keyspec { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
	.rp-section-head--row { display: block; }
	.rp-machine__pair, .rp-features__list, .rp-apps__media, .rp-lines__grid { grid-template-columns: 1fr; }
	.rp-machine__item + .rp-machine__item { border-left: 0; border-top: 1px solid var(--line); }
	.rp-line, .rp-line + .rp-line { padding: var(--s4) 0; border-left: 0; border-top: 1px solid var(--line); }
	.rp-feature, .rp-feature:nth-child(even) { padding: var(--s5) 0; border-left: 0; }
	.rp-apps__list li { grid-template-columns: 1fr; gap: var(--s1); }
	.rp-story__results b { font-size: 22px; }
	.rp-story__results div { padding-left: var(--s3); }
	.rp-inq__head { display: block; padding: var(--s5); }
	.rp-inq__direct { border-left: 0; border-top: 1px solid var(--line); padding: var(--s4) 0 0; margin-top: var(--s4); }
	.rp-inq__body { padding: var(--s5); }
	.rp-inq__grid { grid-template-columns: 1fr; }
	.rp-stats--band .rp-stat + .rp-stat { padding-left: 0; border-left: 0; }
}
