/* REDX theme styles. Content/typography tokens live in theme.json; this file holds layout and effects only. */
:root {
	--rx-red: var(--wp--preset--color--red, #ed1c24);
	--rx-red-deep: var(--wp--preset--color--red-deep, #d6132b);
	--rx-ink: var(--wp--preset--color--ink, #0d0e10);
	--rx-graphite: var(--wp--preset--color--graphite, #1a1c1f);
	--rx-charcoal: var(--wp--preset--color--charcoal, #26292d);
	--rx-paper: var(--wp--preset--color--paper, #f3f4f5);
	--rx-line: rgba(255, 255, 255, 0.16);
	--rx-header-h: 72px;
	--rx-wrap: 1680px;
	--rx-gutter: clamp(1.25rem, 2.4vw, 2.5rem);
	--rx-prose: 46rem;
	--rx-display: var(--wp--preset--font-family--display, 'Barlow Condensed', sans-serif);
}
html { scroll-padding-top: calc(var(--rx-header-h) + var(--wp-admin--admin-bar--height, 0px) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 600px) { html { scroll-padding-top: calc(var(--rx-header-h) + 8px); } .admin-bar .rx-site-header { top: 0; } }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
:where(a, button, summary, [tabindex]):focus-visible { outline: 3px solid var(--rx-red); outline-offset: 3px; }
.rx-dark :where(a, button, summary, [tabindex]):focus-visible, .rx-ink :where(a, button, summary, [tabindex]):focus-visible { outline-color: #fff; }

.rx-skip { position: absolute; left: 1rem; top: -4rem; z-index: 1000; background: var(--rx-red); color: #fff; padding: 0.75rem 1.25rem; font-weight: 700; text-decoration: none; transition: top 0.15s; }
.rx-skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block: 0; }
.rx-site-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 60; background: #fff; border-bottom: 1px solid rgba(13, 14, 16, 0.12); border-top: 3px solid var(--rx-red); }
.rx-header-bar { padding: 0.55rem max(var(--rx-gutter), calc((100% - var(--rx-wrap)) / 2)); gap: 1.5rem; max-width: 100%; min-height: var(--rx-header-h); box-sizing: border-box; }
.rx-logo { margin: 0; flex: 0 0 auto; }
.rx-logo img { display: block; height: auto; max-width: 100%; }
.rx-header-bar .rx-logo img { width: clamp(112px, 12vw, 150px) !important; }
.rx-nav { font-family: var(--rx-display); font-weight: 600; font-size: 1.1875rem; letter-spacing: 0.06em; text-transform: uppercase; }
.rx-nav .wp-block-navigation-item__content { color: var(--rx-ink); text-decoration: none; padding: 0.4rem 0; position: relative; }
.rx-nav .wp-block-navigation-item__content::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rx-red); transform: scaleX(0); transform-origin: left; transition: transform 0.25s; }
.rx-nav .wp-block-navigation-item__content:hover::after, .rx-nav .wp-block-navigation-item__content:focus-visible::after { transform: scaleX(1); }
.rx-header-cta { margin: 0; }
.rx-header-cta .wp-block-button__link { padding: 0.55rem 1.1rem; font-size: 1rem; }
.wp-block-navigation__responsive-container-open { color: var(--rx-ink); }
.wp-block-navigation__responsive-container.is-menu-open { background: #fff !important; color: var(--rx-ink) !important; position: fixed; inset: 0; z-index: 100000; overflow-y: auto; overscroll-behavior: contain; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.75rem; }
@media (min-width: 600px) and (max-width: 1099px) {
	.rx-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.rx-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 599px) { .rx-header-bar .rx-header-cta { display: none !important; } .rx-header-bar { gap: 0.75rem; } }
@media (max-width: 1099px) { .rx-nav { margin-left: auto; } }

/* ---------- Sections ---------- */
.rx-main { margin: 0; }
.rx-section { padding: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) var(--rx-gutter); position: relative; margin-block: 0 !important; box-sizing: border-box; overflow: hidden; }
.rx-dark { background: var(--rx-graphite); color: #f3f4f5; }
.rx-ink { background: var(--rx-ink); color: #f3f4f5; }
.rx-light { background: #fff; color: var(--rx-ink); }
.rx-paper { background: var(--rx-paper); color: var(--rx-ink); }
.rx-red-band { background: linear-gradient(135deg, var(--rx-red-deep), var(--rx-red) 70%); color: #fff; }
.rx-dark a:not(.wp-block-button__link), .rx-ink a:not(.wp-block-button__link) { color: #ff8b91; }
.rx-red-band a:not(.wp-block-button__link) { color: #fff; }
.rx-section > *, .rx-footer-bar > * { margin-left: calc((100% - min(100%, var(--rx-wrap))) / 2) !important; margin-right: 0 !important; max-width: min(100%, var(--rx-wrap)); box-sizing: border-box; }
.rx-section > :where(h2, p, .wp-block-buttons) { margin-block-start: 0; }
.rx-section > h2 { margin-block: 0.5rem 1.25rem; font-size: var(--wp--preset--font-size--heading-2); max-width: min(100%, 22ch); }
.rx-section > .rx-lead { max-width: min(100%, 46rem); margin-block-end: 1.5rem; }
.rx-section :where(h3) { margin-block: 0 0.6rem; }
.rx-eyebrow, .rx-label { font-family: var(--rx-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 0.75rem; color: var(--rx-red-deep); }
.rx-dark .rx-eyebrow, .rx-ink .rx-eyebrow, .rx-dark .rx-label, .rx-ink .rx-label { color: #ff8b91; }
.rx-red-band .rx-eyebrow, .rx-red-band .rx-label { color: #fff; }
.rx-eyebrow::before { content: ''; display: inline-block; width: 2.25rem; height: 3px; background: currentColor; vertical-align: middle; margin-right: 0.85rem; }
.rx-lead { font-size: var(--wp--preset--font-size--lead); max-width: 46rem; }
.rx-tag { display: inline-block; font-size: 0.9375rem; padding: 0.4rem 0.9rem; border: 1px dashed currentColor; border-radius: 999px; opacity: 0.8; }
.rx-footnote { font-size: 0.9375rem; opacity: 0.9; }
.rx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.rx-split > * { margin: 0 !important; }
@media (max-width: 860px) { .rx-split { grid-template-columns: 1fr; } }
.rx-cols { gap: clamp(1.25rem, 3vw, 3rem); margin-top: 1.5rem; }
.rx-demos { list-style: none; padding: 0; margin: 0; }
.rx-demos li { padding: 0.9rem 0; border-top: 1px solid var(--rx-line); }
.rx-checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.rx-checklist li { padding: 0.65rem 0 0.65rem 2rem; border-top: 1px solid rgba(255, 255, 255, 0.35); position: relative; }
.rx-checklist li::before { content: ''; position: absolute; left: 0.1rem; top: 1.05rem; width: 0.85rem; height: 0.45rem; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg); }

/* Buttons */
.wp-block-button__link { transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--rx-ink); color: #fff; transform: translateY(-2px); }
.rx-dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover, .rx-ink .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: #fff; color: var(--rx-ink); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: inherit; border: 2px solid currentColor; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: var(--rx-ink); border-color: #fff; }
.rx-light .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--rx-ink); color: #fff; }

/* ---------- Hero ---------- */
.rx-hero { background: radial-gradient(ellipse at 78% 38%, rgba(237, 28, 36, 0.3), transparent 55%), linear-gradient(180deg, #0d0e10, #1a1c1f); padding-top: clamp(3rem, 2rem + 4vw, 6rem); padding-bottom: clamp(3.5rem, 2rem + 5vw, 7rem); min-height: min(86vh, 860px); display: flex; align-items: center; }
.rx-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 64px 64px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.rx-hero > * { position: relative; z-index: 1; width: 100%; }
.rx-hero__copy > .rx-lead { max-width: 34rem; }
.rx-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.rx-hero__grid > * { margin: 0 !important; }
.rx-hero__title { font-size: clamp(2.5rem, 1rem + 4.6vw, 5.25rem); margin: 0.25rem 0 1.25rem; max-width: 14ch; }
.rx-hero .rx-lead { color: #d9dcdf; }
.rx-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 1.5rem 0 1.75rem; }
.rx-chips li { font-family: var(--rx-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 1rem; padding: 0.3rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; }
.rx-hero__cta { margin: 0; }
.rx-hero__visual { position: relative; display: block; padding-bottom: 2.5rem; }
.rx-hero__photo { margin: 0; }
.rx-hero__photo img { width: 100% !important; max-width: 700px; height: auto; display: block; margin-inline: auto; filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.55)); }
.rx-hero__teaser { position: absolute; left: 0; bottom: 0; width: min(210px, 36%); margin: 0; }
.rx-hero__teaser img { width: 100% !important; height: auto; border-radius: 14px; }
.rx-hero__teaser figcaption { font-size: 0.75rem; margin-top: 0.4rem; color: #b8bcc0; }
@media (max-width: 860px) {
	.rx-hero { min-height: 0; display: block; }
	.rx-hero__grid { grid-template-columns: 1fr; }
	.rx-hero__teaser { position: static; width: auto; margin: 0.75rem 0 0; }
	.rx-hero__teaser img { display: none; }
	.rx-hero__teaser figcaption { margin-top: 0; }
	.rx-hero__visual { padding-bottom: 0; }
}

/* ---------- Families (bento) ---------- */
.rx-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.rx-bento > * { margin: 0 !important; }
.rx-tile { padding: clamp(1.25rem, 2vw, 2rem); border-radius: 18px; background: #fff; border: 1px solid #d5d8db; border-top: 4px solid var(--rx-red); display: flex; flex-direction: column; gap: 0.35rem; }
.rx-tile > * { margin: 0; }
.rx-tile h3 { font-size: 1.75rem; }
.rx-tile__n { font-family: var(--rx-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.2em; color: var(--rx-red-deep); }
.rx-tile__link { margin-top: auto !important; padding-top: 0.75rem !important; font-weight: 600; }
.rx-tile--air { grid-column: span 5; grid-row: span 2; background: var(--rx-graphite); color: #fff; border-color: var(--rx-graphite); border-top-color: var(--rx-red); }
.rx-tile--air h3 { font-size: clamp(2.25rem, 1.6rem + 2vw, 3.5rem); }
.rx-tile--air .rx-tile__n, .rx-tile--hyd .rx-tile__n { color: #ff8b91; }
.rx-tile--fuel { grid-column: span 4; }
.rx-tile--oil { grid-column: span 3; }
.rx-tile--hyd { grid-column: span 7; background: linear-gradient(135deg, #2a0d10, #5a1218); color: #fff; border-color: #5a1218; }
.rx-tile--trans, .rx-tile--ccv, .rx-tile--cabin { grid-column: span 4; }
.rx-tile--air a, .rx-tile--hyd a { color: #ff9fa4 !important; }
@media (max-width: 960px) { .rx-tile--air, .rx-tile--fuel, .rx-tile--oil, .rx-tile--hyd, .rx-tile--trans, .rx-tile--ccv, .rx-tile--cabin { grid-column: span 12; grid-row: auto; } .rx-tile--oil, .rx-tile--fuel { grid-column: span 6; } }
@media (max-width: 640px) { .rx-tile--oil, .rx-tile--fuel { grid-column: span 12; } }

/* Demo sections */
.rx-demo-section .wp-block-redx-flow-demo { margin-top: 2rem; }
.rx-faq-title { margin-top: 3.5rem !important; }
.rx-faq { border-top: 1px solid #d5d8db; padding: 0.9rem 0; }
.rx-faq summary { font-weight: 700; cursor: pointer; font-size: 1.0625rem; }
.rx-faq p { margin: 0.6rem 0 0; max-width: 62ch; }

/* ---------- Footer ---------- */
.rx-footer-bar { padding: clamp(2.5rem, 4vw, 4.5rem) var(--rx-gutter); }
.rx-footer-brand { font-family: var(--rx-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0.75rem 0 0.25rem; }
.rx-footer-list { list-style: none; padding: 0; margin: 0; }
.rx-footer-list li { padding: 0.25rem 0; }
.rx-footer-note { font-size: 0.875rem; opacity: 0.75; }
.rx-footer-bar a { color: #ff8b91; }

/* ---------- Scroll reveal (class added by theme.js only when motion is allowed) ---------- */
.rx-js-reveal .rx-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--rx-d, 0ms); }
.rx-js-reveal .rx-reveal.is-visible { opacity: 1; transform: none; }
/* illustration pieces appear in order: tracks -> house -> arm -> components -> markers; pleats draw in */
.rx-js-reveal .rx-map__stage:not(.is-visible) .mx-tracks, .rx-js-reveal .rx-map__stage:not(.is-visible) .mx-house, .rx-js-reveal .rx-map__stage:not(.is-visible) .mx-arm,
.rx-js-reveal .rx-map__stage:not(.is-visible) .mx-ghost, .rx-js-reveal .rx-map__stage:not(.is-visible) .rx-mk { opacity: 0; }
.rx-js-reveal .rx-map__stage .mx-tracks, .rx-js-reveal .rx-map__stage .mx-house, .rx-js-reveal .rx-map__stage .mx-arm, .rx-js-reveal .rx-map__stage .mx-ghost { transition: opacity 0.6s ease; }
.rx-js-reveal .rx-map__stage .mx-house { transition-delay: 0.15s; }
.rx-js-reveal .rx-map__stage .mx-arm { transition-delay: 0.3s; }
.rx-js-reveal .rx-map__stage .mx-ghost { transition-delay: 0.45s; }
.rx-js-reveal .rx-map__stage .rx-mk { transition: opacity 0.5s ease 0.6s, transform 0.2s; }
@media (prefers-reduced-motion: reduce) { .rx-js-reveal .rx-reveal { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ---------- Rev 2: stronger REDX identity (red accents, X mark from the logo) ---------- */
.rx-section > h2::after { content: ''; display: block; width: 3.25rem; height: 4px; margin-top: 0.85rem; background: var(--rx-red); }
.rx-red-band > h2::after { background: #fff; }
::selection { background: var(--rx-red); color: #fff; }
.rx-nav .wp-block-navigation-item__content[aria-current="page"], .rx-nav .current-menu-item > .wp-block-navigation-item__content { color: var(--rx-red-deep); }
.rx-tile { transition: border-color 0.2s, box-shadow 0.2s; }
.rx-tile:hover { box-shadow: 0 10px 28px rgba(237, 28, 36, 0.14); border-color: rgba(237, 28, 36, 0.45); }
.rx-demo-section { border-top: 4px solid var(--rx-red); }
.rx-footer-bar { border-top: 4px solid var(--rx-red); }
/* Large cropped X (exact logo sign, local vector) behind four sections only. Decoration: inert, clipped by its own section. */
#top::before, #how::before, #about::before, #contact::before { content: ''; position: absolute; z-index: 0; pointer-events: none; background: url('../images/logo-sign-2.svg') center / contain no-repeat; aspect-ratio: 195 / 252; width: min(46vw, 700px); opacity: 0.06; }
#top::before { right: -5%; top: -8%; opacity: 0.05; }
#how::before { left: -8%; bottom: -22%; opacity: 0.05; }
#about::before { right: -6%; bottom: -26%; opacity: 0.05; }
#contact::before { right: -4%; top: -10%; width: min(40vw, 620px); opacity: 0.07; filter: brightness(0) invert(1); }
#top > *, #how > *, #about > *, #contact > * { position: relative; z-index: 1; }
@media (max-width: 860px) { #top::before, #how::before, #about::before, #contact::before { width: 70vw; } }
/* small X accent next to the section kickers on dark sections */
.rx-dark .rx-eyebrow::after, .rx-ink .rx-eyebrow::after { content: ''; display: inline-block; width: 0.8em; height: 1em; margin-left: 0.7rem; vertical-align: -0.1em; background: url('../images/logo-sign-2.svg') center / contain no-repeat; opacity: 0.85; }

/* ---------- Stage 2b: sub-pages (same shared container, red accents and X mark as the Home page) ---------- */
.rx-page-hero { background: radial-gradient(ellipse at 82% 30%, rgba(237, 28, 36, 0.26), transparent 55%), linear-gradient(180deg, #0d0e10, #1a1c1f); padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); padding-bottom: clamp(3rem, 2rem + 3vw, 5.5rem); }
.rx-page-hero::before, .rx-cta::before { content: ''; position: absolute; z-index: 0; pointer-events: none; background: url('../images/logo-sign-2.svg') center / contain no-repeat; aspect-ratio: 195 / 252; width: min(46vw, 700px); }
.rx-page-hero::before { right: -5%; top: -12%; opacity: 0.05; }
.rx-cta::before { right: -4%; top: -10%; width: min(40vw, 620px); opacity: 0.07; filter: brightness(0) invert(1); }
.rx-page-hero > *, .rx-cta > * { position: relative; z-index: 1; }
@media (max-width: 860px) { .rx-page-hero::before, .rx-cta::before { width: 70vw; } }
.rx-page-title { font-size: clamp(2.5rem, 1rem + 4.4vw, 5rem); margin: 0.25rem 0 1rem !important; max-width: 18ch; }
.rx-page-hero .rx-lead { color: #d9dcdf; max-width: 46rem; }
.rx-page-hero .rx-hero__cta { margin-top: 1.75rem; }
.rx-crumbs { font-size: 0.9375rem; margin: 0 0 1.25rem; color: #b8bcc0; }
.rx-crumbs a { color: #ff8b91; text-decoration: none; }
.rx-crumbs a:hover, .rx-crumbs a:focus-visible { text-decoration: underline; }
.rx-ticks { list-style: none; padding: 0; margin: 0 0 1rem; }
.rx-ticks li { padding: 0.6rem 0 0.6rem 1.9rem; border-top: 1px solid rgba(128, 133, 140, 0.35); position: relative; }
.rx-ticks li::before { content: ''; position: absolute; left: 0.1rem; top: 1.1rem; width: 0.8rem; height: 0.4rem; border-left: 3px solid var(--rx-red); border-bottom: 3px solid var(--rx-red); transform: rotate(-45deg); }
.rx-dark .rx-ticks li::before, .rx-ink .rx-ticks li::before { border-color: #ff8b91; }
.rx-linklist { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.rx-linklist li { margin: 0; }
.rx-linklist a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1rem; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; font-weight: 600; }
.rx-linklist a:hover, .rx-linklist a:focus-visible { background: var(--rx-red); border-color: var(--rx-red); color: #fff; }
.rx-choose { margin-top: 2.5rem; }
.rx-range-photo { margin: 0; }
.rx-range-photo img { display: block; width: 100%; max-width: 700px; height: auto; }
.rx-faq summary::marker { color: var(--rx-red); }
.rx-split .rx-faq:first-child { border-top: 0; padding-top: 0; }
.rx-section > .wp-block-buttons { margin-top: 1.5rem; }
.rx-tag { margin: 0.25rem 0 0; }
